protected override bool OnExecute(BehaviorContext context) { for (int i = 0; i < range; i++) { child.Execute(context); } return(true); }
protected override bool OnExecute(BehaviorContext context) { if (inference(context)) { return(thenChild.Execute(context)); } else { return(false); } }
protected override bool OnExecute(BehaviorContext context) { bool isSuccess = false; while (inference(context)) { untilChild.Execute(context); isSuccess = true; } return(isSuccess); }
protected override bool OnExecute(BehaviorContext context) { var randGen = new Random(); if (randGen.NextDouble() > threshold) { return(child.Execute(context)); } else { return(false); } }
protected override bool OnExecute(BehaviorContext context) { child.Execute(context); return(true); }
protected override bool OnExecute(BehaviorContext context) { return(!child.Execute(context)); }