public class IfElse extends BehaviorGoalAdapter
Constructor and Description |
---|
IfElse(Condition condition,
Behavior ifBehavior,
Behavior elseBehavior) |
Modifier and Type | Method and Description |
---|---|
static IfElse |
create(Condition condition,
Behavior ifBehavior,
Behavior elseBehavior) |
void |
reset()
Resets the goal and any resources or state it is holding.
|
BehaviorStatus |
run()
Ticks the behavior, optionally changing the state that it is in.
|
boolean |
shouldExecute() |
create, run, shouldExecute
public void reset()
Goal
public BehaviorStatus run()
Behavior
public boolean shouldExecute()
Copyright © 2021. All rights reserved.