Class WaitTask
java.lang.Object
com.csse3200.game.ai.tasks.DefaultTask
com.csse3200.game.components.tasks.WaitTask
- All Implemented Interfaces:
Task
Task that does nothing other than waiting for a given time. Status is Finished
after the time has passed.
-
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
-
Method Summary
Methods inherited from class com.csse3200.game.ai.tasks.DefaultTask
create, getStatus, stop
-
Constructor Details
-
WaitTask
public WaitTask(float duration) - Parameters:
duration
- How long to wait for, in seconds.
-
-
Method Details
-
start
public void start()Start waiting from now until duration has passed.- Specified by:
start
in interfaceTask
- Overrides:
start
in classDefaultTask
-
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
-