Package com.dragonboatrace.tools
Class Settings
- java.lang.Object
-
- com.dragonboatrace.tools.Settings
-
public class Settings extends java.lang.Object
Static class used to hold settings
-
-
Field Summary
Fields Modifier and Type Field Description static float
COLLIDABLE_SPAWN_RATE_MAX
Maximum time, in seconds, before the next collidable can spawnstatic float
COLLIDABLE_SPAWN_RATE_MIN
Minimum time, in seconds, before the next collidable can spawnstatic boolean
FULLSCREEN
If the game is fullscreen or not.static int
HEIGHT
The height of the window.static int
OBSTACLE_COLLISION_PENALTY
The velocity penalty given when a collision occursstatic float
OBSTACLE_COLLISION_TIME
The the boat must wait before moving again after a collision.static float
OBSTACLE_DAMAGE_MULTIPLIER
This number multiplied by the obstacle's damage gives the total amount of damage an obstacle deals.static double
OBSTACLE_SPAWN_CHANCE
Chance of an obsticle spawning rather then a powerupstatic int
PLAYER_COUNT
The number of boats in the game, including the player itself.static java.lang.String
SAVE_FILE_NAME
Name of the file where the data will be savedstatic int
SCALAR
The global scalar at which to scale entities.static int
STAMINA_SPEED_DIVISION
Reduces the scalar that stamina gives when acceleratingstatic int
WIDTH
The width of the window.
-
Constructor Summary
Constructors Constructor Description Settings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
restore()
static void
save()
static void
setFULLSCREEN(boolean FULLSCREEN)
Set if the window should be fullscreen or not.static void
setObstacleCollisionPenalty(int obstacleCollisionPenalty)
Update the obstacle collision velocity penalty.static void
setObstacleCollisionTime(float obstacleCollisionTime)
Update the obstacle collision time penalty.static void
setPlayerCount(int playerCount)
Set the number of players in the game.static void
setResolution(int width, int height)
Set the resolution of the screen.static void
setStaminaSpeedDivision(int staminaSpeedDivision)
Update the Stamina Speed Scalar.
-
-
-
Field Detail
-
WIDTH
public static int WIDTH
The width of the window.
-
HEIGHT
public static int HEIGHT
The height of the window.
-
FULLSCREEN
public static boolean FULLSCREEN
If the game is fullscreen or not.
-
SCALAR
public static int SCALAR
The global scalar at which to scale entities.
-
PLAYER_COUNT
public static int PLAYER_COUNT
The number of boats in the game, including the player itself.
-
STAMINA_SPEED_DIVISION
public static int STAMINA_SPEED_DIVISION
Reduces the scalar that stamina gives when accelerating
-
COLLIDABLE_SPAWN_RATE_MIN
public static float COLLIDABLE_SPAWN_RATE_MIN
Minimum time, in seconds, before the next collidable can spawn
-
COLLIDABLE_SPAWN_RATE_MAX
public static float COLLIDABLE_SPAWN_RATE_MAX
Maximum time, in seconds, before the next collidable can spawn
-
OBSTACLE_SPAWN_CHANCE
public static double OBSTACLE_SPAWN_CHANCE
Chance of an obsticle spawning rather then a powerup
-
OBSTACLE_COLLISION_PENALTY
public static int OBSTACLE_COLLISION_PENALTY
The velocity penalty given when a collision occurs
-
OBSTACLE_COLLISION_TIME
public static float OBSTACLE_COLLISION_TIME
The the boat must wait before moving again after a collision.
-
OBSTACLE_DAMAGE_MULTIPLIER
public static float OBSTACLE_DAMAGE_MULTIPLIER
This number multiplied by the obstacle's damage gives the total amount of damage an obstacle deals.
-
SAVE_FILE_NAME
public static java.lang.String SAVE_FILE_NAME
Name of the file where the data will be saved
-
-
Method Detail
-
setResolution
public static void setResolution(int width, int height)
Set the resolution of the screen.- Parameters:
width
- The width of the screen.height
- The height of the screen.
-
setFULLSCREEN
public static void setFULLSCREEN(boolean FULLSCREEN)
Set if the window should be fullscreen or not.- Parameters:
FULLSCREEN
- A boolean if the window should be fullscreen.
-
setPlayerCount
public static void setPlayerCount(int playerCount)
Set the number of players in the game.- Parameters:
playerCount
- The number of players to change to.
-
setStaminaSpeedDivision
public static void setStaminaSpeedDivision(int staminaSpeedDivision)
Update the Stamina Speed Scalar.- Parameters:
staminaSpeedDivision
- The new scalar to use.
-
setObstacleCollisionPenalty
public static void setObstacleCollisionPenalty(int obstacleCollisionPenalty)
Update the obstacle collision velocity penalty.- Parameters:
obstacleCollisionPenalty
- The new penalty to use.
-
setObstacleCollisionTime
public static void setObstacleCollisionTime(float obstacleCollisionTime)
Update the obstacle collision time penalty.- Parameters:
obstacleCollisionTime
- The new penalty to use.
-
restore
public static void restore()
-
save
public static void save()
-
-