/** * 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) { }
public override void open(Tick tick) { var startTime = DateTime.Now.Millisecond; tick.blackboard.Set("startTime", startTime, tick.tree.id, this.id); }
/** * 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); }
/** * 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) { }
/** * 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) { }
/** * 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) { }
/** * Wrapper for exit method. * @method _exit * @param {Tick} tick A tick instance. * @protected **/ public void _exit(Tick tick) { tick._exitNode(this); this.exit(tick); }
/** * 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); }
/** * 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)); }
/** * 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); }
/** * Wrapper for enter method. * @method _enter * @param {Tick} tick A tick instance. * @protected **/ public void _enter(Tick tick) { //tick._enterNode(this); this.enter(tick); }