Exemplo n.º 1
0
 /**
  * Exit method, override this to use. Called every time in the end of the
  * execution.
  *
  * @method exit
  * @param {Tick} tick A tick instance.
  **/
 public virtual void exit(Tick tick)
 {
 }
Exemplo n.º 2
0
        public override void open(Tick tick)
        {
            var startTime = DateTime.Now.Millisecond;

            tick.blackboard.Set("startTime", startTime, tick.tree.id, this.id);
        }
Exemplo n.º 3
0
 /**
  * Tick method, override this to use. This method must contain the real
  * execution of node (perform a task, call children, etc.). It is called
  * every time a node is asked to execute.
  *
  * @method tick
  * @param {Tick} tick A tick instance.
  **/
 public virtual B3Status tick(Tick tick)
 {
     return(B3Status.ERROR);
 }
Exemplo n.º 4
0
 /**
  * Close method, override this to use. This method is called after the tick
  * callback, and only if the tick return a state different from
  * `RUNNING`.
  *
  * @method close
  * @param {Tick} tick A tick instance.
  **/
 public virtual void close(Tick tick)
 {
 }
Exemplo n.º 5
0
 /**
  * Enter method, override this to use. It is called every time a node is
  * asked to execute, before the tick itself.
  *
  * @method enter
  * @param {Tick} tick A tick instance.
  **/
 public virtual void enter(Tick tick)
 {
 }
Exemplo n.º 6
0
 /**
  * Open method, override this to use. It is called only before the tick
  * callback and only if the not isn't closed.
  *
  * Note: a node will be closed if it returned `RUNNING` in the tick.
  *
  * @method open
  * @param {Tick} tick A tick instance.
  **/
 public virtual void open(Tick tick)
 {
 }
Exemplo n.º 7
0
 /**
  * Wrapper for exit method.
  * @method _exit
  * @param {Tick} tick A tick instance.
  * @protected
  **/
 public void _exit(Tick tick)
 {
     tick._exitNode(this);
     this.exit(tick);
 }
Exemplo n.º 8
0
 /**
  * Wrapper for close method.
  * @method _close
  * @param {Tick} tick A tick instance.
  * @protected
  **/
 public void _close(Tick tick)
 {
     tick._closeNode(this);
     tick.blackboard.Set("isOpen", false, tick.tree.id, this.id);
     this.close(tick);
 }
Exemplo n.º 9
0
 /**
  * Wrapper for tick method.
  * @method _tick
  * @param {Tick} tick A tick instance.
  * @return {Constant} A state constant.
  * @protected
  **/
 public B3Status _tick(Tick tick)
 {
     //tick._tickNode(this);
     return(this.tick(tick));
 }
Exemplo n.º 10
0
 /**
  * Wrapper for open method.
  * @method _open
  * @param {Tick} tick A tick instance.
  * @protected
  **/
 public void _open(Tick tick)
 {
     //tick._openNode(this);
     //tick.blackboard.set('isOpen', true, tick.tree.id, this.id);
     this.open(tick);
 }
Exemplo n.º 11
0
 /**
  * Wrapper for enter method.
  * @method _enter
  * @param {Tick} tick A tick instance.
  * @protected
  **/
 public void _enter(Tick tick)
 {
     //tick._enterNode(this);
     this.enter(tick);
 }