Package com.dragonboatrace.tools
Class Settings
- java.lang.Object
-
- com.dragonboatrace.tools.Settings
-
public class Settings extends java.lang.ObjectStatic class used to hold settings
-
-
Field Summary
Fields Modifier and Type Field Description static floatCOLLIDABLE_SPAWN_RATE_MAXMaximum time, in seconds, before the next collidable can spawnstatic floatCOLLIDABLE_SPAWN_RATE_MINMinimum time, in seconds, before the next collidable can spawnstatic booleanFULLSCREENIf the game is fullscreen or not.static intHEIGHTThe height of the window.static intOBSTACLE_COLLISION_PENALTYThe velocity penalty given when a collision occursstatic floatOBSTACLE_COLLISION_TIMEThe the boat must wait before moving again after a collision.static floatOBSTACLE_DAMAGE_MULTIPLIERThis number multiplied by the obstacle's damage gives the total amount of damage an obstacle deals.static doubleOBSTACLE_SPAWN_CHANCEChance of an obsticle spawning rather then a powerupstatic intPLAYER_COUNTThe number of boats in the game, including the player itself.static java.lang.StringSAVE_FILE_NAMEName of the file where the data will be savedstatic intSCALARThe global scalar at which to scale entities.static intSTAMINA_SPEED_DIVISIONReduces the scalar that stamina gives when acceleratingstatic intWIDTHThe width of the window.
-
Constructor Summary
Constructors Constructor Description Settings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidrestore()static voidsave()static voidsetFULLSCREEN(boolean FULLSCREEN)Set if the window should be fullscreen or not.static voidsetObstacleCollisionPenalty(int obstacleCollisionPenalty)Update the obstacle collision velocity penalty.static voidsetObstacleCollisionTime(float obstacleCollisionTime)Update the obstacle collision time penalty.static voidsetPlayerCount(int playerCount)Set the number of players in the game.static voidsetResolution(int width, int height)Set the resolution of the screen.static voidsetStaminaSpeedDivision(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()
-
-