Class KangaJoeyTask

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

public class KangaJoeyTask extends DefaultTask implements PriorityTask
A task that allows an entity to wait for a set time and then spawn a small kangaroo joey entity near the owner.
  • Constructor Details

    • KangaJoeyTask

      public KangaJoeyTask(Entity target, float range, int maxSpawns)
      A task that allows an entity to wait for a set time and then spawn a small kangaroo joey near the owner.
      Parameters:
      target - The target entity (could be the player or another entity).
      range - The distance within which the joey will be spawned.
      maxSpawns - Maximum number of Joeys that can be spawned.
  • Method Details

    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface PriorityTask
    • update

      public void update()
      Description copied from interface: Task
      Run one frame of the task. Similar to the update() in Components.
      Specified by:
      update in interface Task
      Overrides:
      update in class DefaultTask