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:
start
in interfaceTask
- Overrides:
start
in classDefaultTask
-
getMovementTask
-
update
public void update()update direction (for moving targets)- Specified by:
update
in interfaceTask
- Overrides:
update
in classDefaultTask
-
getPriority
public int getPriority()get priority- Specified by:
getPriority
in interfacePriorityTask
- Returns:
- 0 if it's not dusk or night, 2 otherwise
-
stop
public void stop()Description copied from interface:Task
Stop the task immediately. This can be called at any time by the AI controller.- Specified by:
stop
in interfaceTask
- Overrides:
stop
in classDefaultTask
-