public class TimerDecorator extends BehaviorGoalAdapter
Behavior
and enforces a tick limit, after which it will return BehaviorStatus.FAILURE
and
reset the child Behavior
.Modifier and Type | Method and Description |
---|---|
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() |
static TimerDecorator |
tickLimiter(Behavior wrapping,
int tickLimit) |
create, run, shouldExecute
public void reset()
Goal
public BehaviorStatus run()
Behavior
public boolean shouldExecute()
public static TimerDecorator tickLimiter(Behavior wrapping, int tickLimit)
Copyright © 2021. All rights reserved.