E - type of the blackboard object that tasks use to read or modify game statepublic class Wait<E> extends LeafTask<E>
Wait is a leaf that keeps running for the specified amount of time then succeeds.Task.Status| Modifier and Type | Field and Description |
|---|---|
FloatDistribution |
seconds
Mandatory task attribute specifying the random distribution that determines the timeout in seconds.
|
| Constructor and Description |
|---|
Wait()
Creates a
Wait task that immediately succeeds. |
Wait(float seconds)
Creates a
Wait task running for the specified number of seconds. |
Wait(FloatDistribution seconds)
Creates a
Wait task running for the specified number of seconds. |
| Modifier and Type | Method and Description |
|---|---|
protected Task<E> |
copyTo(Task<E> task)
Copies this task to the given task.
|
Task.Status |
execute()
Executes this
Wait task. |
void |
start()
Draws a value from the distribution that determines the seconds to wait for.
|
addChildToTask, childFail, childRunning, childSuccess, getChild, getChildCount, runpublic FloatDistribution seconds
public Wait()
Wait task that immediately succeeds.public Wait(float seconds)
Wait task running for the specified number of seconds.seconds - the number of seconds to wait forpublic Wait(FloatDistribution seconds)
Wait task running for the specified number of seconds.seconds - the random distribution determining the number of seconds to wait forpublic void start()
This method is called when the task is entered. Also, this method internally calls GdxAI.getTimepiece().getTime() to get the current AI time. This means that
update the timepiece this task will keep running indefinitely.public Task.Status execute()
Wait task.Copyright © 2018. All rights reserved.