Class MazeGameManagerComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.minigames.maze.components.MazeGameManagerComponent

public class MazeGameManagerComponent extends Component
A class to manage the maze mini-game most notably the score. This is attached to the player
  • 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

      public void setLastFishEgg(Entity entity)
      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
      Overrides:
      update in class Component