Class AnimalEffectsController

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.npc.AnimalEffectsController
All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable

public class AnimalEffectsController extends Component
A component responsible for managing animation effects for animal entities in the game.
  • Constructor Details

    • AnimalEffectsController

      public AnimalEffectsController()
  • Method Details

    • create

      public void create()
      Initializes the AnimalEffectsController and sets up event listeners for managing animation effects.
      Overrides:
      create in class Component
    • startEffect

      public void startEffect(String trigger)
      Starts a specific animation effect for the animal entity based on the given trigger.
      Parameters:
      trigger - The trigger for the animation effect, such as "tamed," "fed," "runAwayStart," etc.
    • startTimedEffect

      public void startTimedEffect(String trigger, float duration)
      Starts a timed animation effect for the animal entity based on the given trigger and duration.
      Parameters:
      trigger - The trigger for the animation effect, such as "tamed," "fed," "runAwayStart," etc.
      duration - The duration (in seconds) for which the animation effect should be active.