예제 #1
0
 /***************
 * A decorator node that ticks until either the condition is met and stops ticking the child,
 * or until the child returns a terminating status (SUCCESS, FAILURE, ERROR, or HALT).
 * If the condition is met, returns the status specified to be returned.
 ***************/
 public TickUntilConditionNode(string name,
                               ConditionNode condition,
                               NodeStatus conditionHaltStatus,
                               NodeStatus haltReturnStatus,
                               bool mustTickOnce,
                               Node child) : base(name, condition, child)
 {
     _conditionHaltStatus = conditionHaltStatus;
     _haltReturnStatus    = haltReturnStatus;
     _entered             = false;
     _mustTickOnce        = mustTickOnce;
     _tickedOnce          = false;
 }
예제 #2
0
 public AnimalDecoratorNode(string name, ConditionNode condition, Node child) : base(name, child)
 {
     _condition = condition;
 }