Class KangaJoeyTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.KangaJoeyTask
- All Implemented Interfaces:
PriorityTask
,Task
A task that allows an entity to wait for a set time and then spawn a small kangaroo joey entity near the owner.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.csse3200.game.ai.tasks.Task
Task.Status
-
Field Summary
Fields inherited from class com.csse3200.game.ai.tasks.DefaultTask
owner, status
-
Constructor Summary
ConstructorsConstructorDescriptionKangaJoeyTask
(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. -
Method Summary
Methods inherited from class com.csse3200.game.ai.tasks.DefaultTask
create, getStatus, setOwner, start, stop
-
Constructor Details
-
KangaJoeyTask
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 interfacePriorityTask
-
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 interfaceTask
- Overrides:
update
in classDefaultTask
-