Class PlayerCombatAnimationController

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.player.PlayerCombatAnimationController

public class PlayerCombatAnimationController extends Component
The controller for the player combat item animator. This controller locks the player combat item animator to overlay the player entity and also uses event listeners to control the animation of the combat item overlay.
  • Constructor Details

    • PlayerCombatAnimationController

      public PlayerCombatAnimationController(Entity playerEntity)
      Creates a player combat item animation controller with the joined player entity with which the animation controller overlays.
      Parameters:
      playerEntity - the player entity which the combat item animation controller overlays
  • Method Details

    • update

      public void update()
      Updates the combat item animator to always be overlaid the player entity
      Overrides:
      update in class Component
    • create

      public void create()
      Initialises all the required animation listeners
      Overrides:
      create in class Component
    • animateHera

      public void animateHera()
      Triggers the hera item animation of the combat item animator.