Exemplo n.º 1
0
 public override void ChildFail(TaskId task)
 {
     this.Fail();
 }
Exemplo n.º 2
0
 public override void ChildRunning(TaskId task, TaskId reporter)
 {
     this.Running();
 }
Exemplo n.º 3
0
 public override void ChildSuccess(TaskId task)
 {
     this.Success();
 }
Exemplo n.º 4
0
 public override void ChildRunning(TaskId task, TaskId reporter)
 {
     base.ChildRunning(task, reporter);
     this.Condition = false;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Creates a decorator that wraps the given task
 /// </summary>
 /// <param name="child">the task that will be wrapped</param>
 public Decorator(TaskId child)
 {
     this.Child = child;
 }
 public override void ChildFail(TaskId task)
 {
     this.RunningChild = TaskId.Invalid;
 }
Exemplo n.º 7
0
 protected LoopDecorator(TaskId child)
     : base(child)
 {
 }
Exemplo n.º 8
0
        // -------------------------------------------------------------------
        // Protected
        // -------------------------------------------------------------------

        /// <summary>
        /// This method will add a child to the list of this task's children
        /// </summary>
        /// <param name="child">the child task which will be added</param>
        /// <returns>the index where the child has been added</returns>
        /// <exception cref="IllegalStateException">if the child cannot be added for whatever reason</exception>
        protected abstract int AddChildToTask(TaskId child);
 public override void ChildSuccess(TaskId task)
 {
     this.RunningChild = TaskId.Invalid;
 }
Exemplo n.º 10
0
 /// <summary>
 /// This method will be called when one of the children of this task fails
 /// </summary>
 /// <param name="task">the task that failed</param>
 public abstract void ChildFail(TaskId task);
Exemplo n.º 11
0
 /// <summary>
 /// This method will be called when one of the children of this task succeeds
 /// </summary>
 /// <param name="task">the task that succeeded</param>
 public abstract void ChildSuccess(TaskId task);
Exemplo n.º 12
0
 /// <summary>
 /// This method will be called when one of the ancestors of this task needs to run again
 /// </summary>
 /// <param name="task">the task that needs to run again</param>
 /// <param name="reporter">the task that reports, usually one of this task's children</param>
 public abstract void ChildRunning(TaskId task, TaskId reporter);
Exemplo n.º 13
0
 /// <summary>
 /// This method will set a task as this task's control (parent)
 /// </summary>
 /// <param name="parent">the parent task</param>
 /// <param name="parentStream">the stream of the parent task</param>
 public void SetControl(TaskId parent, BehaviorStream <T> parentStream)
 {
     this.Control = parent;
     this.Stream  = parentStream;
 }
Exemplo n.º 14
0
 // -------------------------------------------------------------------
 // Protected
 // -------------------------------------------------------------------
 protected override int AddChildToTask(TaskId child)
 {
     this.Children.Add(child);
     return(this.Children.Count - 1);
 }