Class EnemyAnimationController

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.npc.EnemyAnimationController

public class EnemyAnimationController extends Component
This class listens to events relevant to enemy entity's state and plays the animation when one of the events is triggered.
  • Constructor Details

    • EnemyAnimationController

      public EnemyAnimationController()
  • 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
    • animateWest

      public void animateWest()
      Play animation when enemy moves west
    • animateEast

      public void animateEast()
      Play animation when enemy moves east
    • animateNorth

      public void animateNorth()
      Play animation when enemy moves north
    • animateSouth

      public void animateSouth()
      Play animation when enemy moves south
    • defaultAnimation

      public void defaultAnimation()
      Display default state enemy sprite
    • attackNorth

      public void attackNorth()
      Play animation when enemy attacks in north direction
    • attackSouth

      public void attackSouth()
      Play animation when enemy attacks in south direction
    • attackWest

      public void attackWest()
      Play animation when enemy attacks in west direction
    • attackEast

      public void attackEast()
      Play animation when enemy attacks in east direction