Exemple #1
0
        public void Update()
        {
            if (m_CurState == null || m_States == null || !m_StateBuilder.IsBuild)
            {
                return;
            }

            m_CurState.OnUpdateState();
            if (m_CurState.CheckConditions(out string nextStateName))
            {
                if (States.TryGetValue(nextStateName, out IState <T> state))
                {
                    ChangeState(state);
                }
            }
        }