java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.minigames.maze.components.tasks.IdleTask
All Implemented Interfaces:
PriorityTask, Task

public class IdleTask extends DefaultTask implements PriorityTask
A Priority task which listens to stun events and forces the AI to sleep for a duration
  • Constructor Details

    • IdleTask

      public IdleTask(int priority)
      Parameters:
      priority - Task priority when task is active (0 when not active).
  • Method Details

    • setActive

      public void setActive()
      Sets the idle task to be active (when AI is not moving)
    • setInactive

      public void setInactive()
      Sets the idle task to be active (when AI is moving)
    • start

      public void start()
      Trigger idle event for animations.
      Specified by:
      start in interface Task
      Overrides:
      start in class DefaultTask
    • getPriority

      public int getPriority()
      Get the tasks priority
      Specified by:
      getPriority in interface PriorityTask
      Returns:
      the tasks priority