Class HostileAnimationController

All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable

public class HostileAnimationController extends AnimalAnimationController
The HostileAnimationController class is responsible for controlling the animations of a hostile NPC entity. It extends the behavior of the AnimalAnimationController and includes functionality for playing attack animations.
  • Constructor Details

    • HostileAnimationController

      public HostileAnimationController()
  • Method Details

    • create

      public void create()
      Initializes the HostileAnimationController when it is created. Sets up event listeners to trigger animations when event occurs.
      Overrides:
      create in class AnimalAnimationController
    • animateIdle

      protected void animateIdle()
      Play idle animation when no action animation is currently playing
      Overrides:
      animateIdle in class AnimalAnimationController
    • animateWalk

      protected void animateWalk()
      Play walk animation when no action animation is currently playing
      Overrides:
      animateWalk in class AnimalAnimationController
    • animateRun

      protected void animateRun()
      Play run animation when no action animation is currently playing
      Overrides:
      animateRun in class AnimalAnimationController
    • update

      public void update()
      Trigger animation when active animation is finished
      Overrides:
      update in class Component