public override void Execute() { stateMachine.Update(); if (_behvourTree != null) { BTNodeStates state = _behvourTree.Behave(); if (state == BTNodeStates.SUCCESS) { if (onUnitFinishTurn != null) { onUnitFinishTurn.Invoke(this); } } if (state == BTNodeStates.FAILURE) // not using at the moment { if (onUnitFinishTurn != null) { onUnitFinishTurn.Invoke(this); } } } }
private void Update() { BehaviourTree.Behave(BehaviourInfo); }