Class ProjectileTask
java.lang.Object
com.deco2800.game.ai.tasks.DefaultTask
com.deco2800.game.components.tasks.ProjectileTask
- All Implemented Interfaces:
PriorityTask,Task
-
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
ConstructorsConstructorDescriptionProjectileTask(Entity target, String projectileType, int priority, float viewDistance, float maxShootDistance, float speed, float waitTime) -
Method Summary
Methods inherited from class com.deco2800.game.ai.tasks.DefaultTask
create, getStatus, stop
-
Constructor Details
-
Method Details
-
start
public void start()Start shoot.- Specified by:
startin interfaceTask- Overrides:
startin classDefaultTask
-
getPriority
public int getPriority()Get the priority of this task- Specified by:
getPriorityin interfacePriorityTask- Returns:
- the priority of this task
-
update
public void update()Update projectile task.- Specified by:
updatein interfaceTask- Overrides:
updatein classDefaultTask
-
waiting
public void waiting()If entity is waiting, set its task to shoot -
shoot
Shoot projectile- Parameters:
projectileType- the type of projectile to shoot
-
setTask
Set the task- Parameters:
task- the task to set it to
-