Establishing key values
Last updated
Last updated
At the moment, this should be your game instance class:
If we check the javadocs, we can see that the GameInstance class has some methods marked with the @MustOverride annotation, these methods are used by the code to obtain key information about the game flow. These methods are:
int getMaxPlayers()
-> It is used to set the maximum number of players allowed in a game instance.
int getTimeBeforeStart(
) -> As we have already seen in the , after the instance is started, the game is prepared to start, this method is used to obtain the time in seconds before the game starts.
int getTimeOfGame()
-> As we already saw in the , after the timer before starting the game ends, the game starts, this method marks in seconds how long the playable time should be.
int getTimeBeforeEnd()
-> As we have already seen in the , after the game timer ends, it prepares to end the game, this method marks in seconds how long the post-game time should last.
At the moment, this should be your game instance class: