Exemple #1
0
        // Update is called once per frame
        protected void Update()
        {
            if (m_CurrentState == null)
            {
                Debug.LogWarning(gameObject.name + " stateMachineBase doesn't have an m_CurrentState.");
                return;
            }

            baseState state = m_StateChanger.UpdateChangeStates(m_StateList, m_CurrentState, gameObject, m_DisplayStates);

            if (state != null)
            {
                m_CurrentState = state;
            }

            m_CurrentState.Update();
            m_CurrentStateName = m_CurrentState.m_StateName;
        }
Exemple #2
0
        // Update is called once per frame
        protected void Update()
        {
            //m_DisplayStates = true;
            if (m_CurrentState == null)
            {
                //Debug.LogWarning(this.name + " stateEditorBase doesn't have an m_CurrentState.");
                //return;
                InitStates();
            }

            baseState state = m_StateChanger.UpdateChangeStates(m_StateList, m_CurrentState, null, m_DisplayStates);

            if (state != null)
            {
                m_CurrentState = state;
            }

            m_CurrentState.Update();
            m_CurrentStateName = m_CurrentState.m_StateName;
        }