Class TransportTask
java.lang.Object
com.deco2800.game.ai.tasks.DefaultTask
com.deco2800.game.components.tasks.TransportTask
- All Implemented Interfaces:
PriorityTask
,Task
Transport to an entity if it is still in attacking range.
-
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
ConstructorsConstructorDescriptionTransportTask
(Entity target, int priority, float effectiveRange) Create a TransportTask with target entity, effective range and its task priority. -
Method Summary
Methods inherited from class com.deco2800.game.ai.tasks.DefaultTask
create, getStatus
-
Constructor Details
-
TransportTask
Create a TransportTask with target entity, effective range and its task priority.- Parameters:
target
- The target entity will be jumped at.priority
- Task priority.effectiveRange
- Maximum effective distance from the entity before giving up.
-
-
Method Details
-
start
public void start()Start the transport task.- Specified by:
start
in interfaceTask
- Overrides:
start
in classDefaultTask
-
update
public void update()Update the transport task.- Specified by:
update
in interfaceTask
- Overrides:
update
in classDefaultTask
-
stop
public void stop()Stop the transport task.- Specified by:
stop
in interfaceTask
- Overrides:
stop
in classDefaultTask
-
getPriority
public int getPriority()Get the priority of this task.- Specified by:
getPriority
in interfacePriorityTask
- Returns:
- integer representing the priority of this task.
-