Class PlayerActions

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.player.PlayerActions

public class PlayerActions extends Component
  • Constructor Details

  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class Component
    • unlocknextarea

      public void unlocknextarea()
      Unlocks the next area.
    • unlockOceanMap

      public void unlockOceanMap(Entity player)
      Checks if the bos in current area is defeat to unlock the ocean area
      Parameters:
      player - entity to check last triggered events
    • update

      public void update()
      Description copied from class: Component
      Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
      Overrides:
      update in class Component
    • isMoving

      public boolean isMoving()
      Gets if the player is moving or not
      Returns:
      boolean of if the player currently moving
    • startCombat

      public void startCombat(Entity enemy)
      Initiates combat with a specified enemy entity. Depending on the type of enemy, it displays an appropriate cutscene screen.
      Parameters:
      enemy - The enemy entity that the player is engaging in combat with.