//------------------------------------------------------------------- public TBTTreeNode AddChild(TBTTreeNode node) { if (_maxChildCount >= 0 && _children.Count >= _maxChildCount) { TLogger.WARNING("**BT** exceeding child count"); return(this); } _children.Add(node); //node._parent = this; return(this); }
//-------------------------------------------------------- // inherented by children- protected virtual void onEnter(/*in*/ TBTWorkingData wData) { TLogger.PROFILE("Enter Node" + this.ToString()); }
protected virtual int onExecute(TBTWorkingData wData) { TLogger.DEBUG("Excute Node" + this.ToString()); return(TBTRunningStatus.FINISHED); }
protected virtual void onExit(TBTWorkingData wData, int runningStatus) { TLogger.PROFILE("Exit Node" + this.ToString()); }