Exemplo n.º 1
0
 public void AddLoop(IActor conditionActor, Func <bool> condition, ActionChain body)
 {
     AddAction(new ChainElement(conditionActor, new LoopAction(conditionActor, condition, body)));
 }
Exemplo n.º 2
0
 public ConditionalAction(Func <bool> condition, ActionChain trueChain, ActionChain falseChain)
 {
     TrueChain  = trueChain;
     FalseChain = falseChain;
 }
Exemplo n.º 3
0
 public void AddBranch(IActor conditionActor, Func <bool> condition, ActionChain trueBranch, ActionChain falseBranch)
 {
     AddAction(new ChainElement(conditionActor, new ConditionalAction(condition, trueBranch, falseBranch)));
 }
Exemplo n.º 4
0
 public LoopAction(IActor conditionActor, Func <bool> condition, ActionChain body)
 {
     Body      = body;
     Condition = condition;
     body.AddAction(conditionActor, this);
 }