Package com.csse3200.game.services
Class LevelService
java.lang.Object
com.csse3200.game.services.LevelService
Allows for global access and control of the game levels
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the integer representation of the current level of the gameGets the private variable containing an EventHandler object and returns itvoid
Increases the integer representing the current level by onevoid
levelControl
(GdxGame.LevelType level) Depending on what level the game is switching to, a method relating to each level will be called, in order to spawn customers with different parametersvoid
reset()
void
setCurrGold
(int gold) void
setCurrLevel
(GdxGame.LevelType newLevel) Manually set the level numbervoid
-
Constructor Details
-
LevelService
public LevelService()Constructor method, initialises both private variables
-
-
Method Details
-
reset
public void reset() -
togglePlayerFinishedLevel
public void togglePlayerFinishedLevel() -
getEvents
Gets the private variable containing an EventHandler object and returns it- Returns:
- the EventHandler object for this service
-
getCurrLevel
Gets the integer representation of the current level of the game- Returns:
- the current level number
-
getCurrGold
public int getCurrGold() -
setCurrGold
public void setCurrGold(int gold) -
incrementLevel
public void incrementLevel()Increases the integer representing the current level by one -
setCurrLevel
Manually set the level number- Parameters:
newLevel
- the new level number
-
levelControl
Depending on what level the game is switching to, a method relating to each level will be called, in order to spawn customers with different parameters- Parameters:
level
- the level number
-