sealed protected override bool Execute(BTTreeRuntimePack _btTree) { if (!_btTree.IsActionRunning(this)) { OnEnter(_btTree); } _btTree.DeclareRunning(this); return OnRunning(_btTree); }
public bool DoExecute(BTTreeRuntimePack _runtimePack) { bool res = Execute(_runtimePack); if (Mgr <GameEngine> .Singleton._gameEngineMode == GameEngine.GameEngineMode.MapEditor) { _runtimePack.UpdateNodeExecutionState(this, res); } return(res); }
protected override bool Execute(BTTreeRuntimePack _btTree) { if (m_children != null) { bool res = false; foreach (BTNode node in m_children) { res = node.DoExecute(_btTree) || res; } return(res); } return(false); }
/** * @brief execute till the first True return **/ protected override bool Execute(BTTreeRuntimePack _btTree) { if (m_children != null) { foreach (BTNode node in m_children) { if (node.DoExecute(_btTree)) { return(true); } } } return(false); }
protected sealed override bool Execute(BTTreeRuntimePack _btTree) { if (m_child != null) { if (JudgeCondition(_btTree)) { return(m_child.DoExecute(_btTree)); } return(false); } else { return(JudgeCondition(_btTree)); } }
public virtual void OnEnter(BTTreeRuntimePack _btTree) { }
public virtual void OnExit(BTTreeRuntimePack _btTree) { }
public virtual bool OnRunning(BTTreeRuntimePack _btTree) { return true; }
protected virtual bool JudgeCondition(BTTreeRuntimePack _btTree) { return(true); }
protected virtual bool Execute(BTTreeRuntimePack _runtimePack) { return(true); }