Modifier and Type | Method and Description |
---|---|
static Sequence |
createRetryingSequence(Behavior... behaviors) |
static Sequence |
createRetryingSequence(Collection<Behavior> behaviors)
Creates a
retrying sequence that will continue from the current Behavior if it returns
BehaviorStatus.FAILURE instead of propagating the failure up to its parent. |
static Sequence |
createSequence(Behavior... behaviors) |
static Sequence |
createSequence(Collection<Behavior> behaviors)
Creates sequence that will stop executing if the current
Behavior returns BehaviorStatus.FAILURE . |
void |
reset()
Resets the goal and any resources or state it is holding.
|
boolean |
retryChildren() |
BehaviorStatus |
run()
Ticks the behavior, optionally changing the state that it is in.
|
String |
toString() |
addBehavior, getBehaviors, removeBehavior, shouldExecute, stopExecution, tickParallel
create, run, shouldExecute
public void reset()
Goal
public boolean retryChildren()
public BehaviorStatus run()
Behavior
public static Sequence createRetryingSequence(Collection<Behavior> behaviors)
retrying
sequence that will continue from the current Behavior
if it returns
BehaviorStatus.FAILURE
instead of propagating the failure up to its parent.public static Sequence createSequence(Collection<Behavior> behaviors)
Behavior
returns BehaviorStatus.FAILURE
.Copyright © 2021. All rights reserved.