Esempio n. 1
0
        public void GOAPUpdate()
        {
            switch (CurrentAction != null ? CurrentAction.Update() : GOAPStatus.Fail)
            {
            case GOAPStatus.Running:
                break;

            case GOAPStatus.Continue:
                IGOAPAction action = actionStack?.Pop();
                action?.OnEnd();
                CurrentAction?.OnStart();
                break;

            case GOAPStatus.Fail:
            default:
                SwitchStack();
                break;
            }
        }