Class MazeGameManagerComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.minigames.maze.components.MazeGameManagerComponent
A class to manage the maze mini-game most notably the score. This is attached to the player
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getScore()
Gets the current scorevoid
incrementScore
(int increment) This is used ot increase the scorevoid
setLastFishEgg
(Entity entity) Tracks the last fish egg for disposal (disposal must happen here to ensure no faulty references witt physics component)void
update()
Automatically called as needed, used to update the score if there is a fish egg to be disposed ofMethods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
MazeGameManagerComponent
public MazeGameManagerComponent()
-
-
Method Details
-
getScore
public int getScore()Gets the current score- Returns:
- the score
-
incrementScore
public void incrementScore(int increment) This is used ot increase the score- Parameters:
increment
- the amount to change the score by
-
setLastFishEgg
Tracks the last fish egg for disposal (disposal must happen here to ensure no faulty references witt physics component)- Parameters:
entity
- the fish egg entity
-
update
public void update()Automatically called as needed, used to update the score if there is a fish egg to be disposed of
-