Class MeleePursueTask
java.lang.Object
com.deco2800.game.ai.tasks.DefaultTask
com.deco2800.game.components.tasks.MeleePursueTask
- All Implemented Interfaces:
PriorityTask,Task
Chases a target entity regardless of distance or line of sight.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.deco2800.game.ai.tasks.Task
Task.Status -
Field Summary
Fields inherited from class com.deco2800.game.ai.tasks.DefaultTask
owner, status -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.deco2800.game.ai.tasks.DefaultTask
create, getStatus
-
Constructor Details
-
MeleePursueTask
chases an entity regardless of line of sight- Parameters:
target- the entity to chase
-
-
Method Details
-
start
public void start()start chasing- Specified by:
startin interfaceTask- Overrides:
startin classDefaultTask
-
getMovementTask
-
update
public void update()update direction (for moving targets)- Specified by:
updatein interfaceTask- Overrides:
updatein classDefaultTask
-
getPriority
public int getPriority()get priority- Specified by:
getPriorityin interfacePriorityTask- Returns:
- 0 if it's not dusk or night, 2 otherwise
-
stop
public void stop()Description copied from interface:TaskStop the task immediately. This can be called at any time by the AI controller.- Specified by:
stopin interfaceTask- Overrides:
stopin classDefaultTask
-