Exemplo n.º 1
0
        public void Update()
        {
            WIPPhase newState = m_Current.Update();

            if (newState != m_Current)
            {
                m_Current = newState;
                m_WIPState.lastStatusChange = Time.time;
            }
        }
Exemplo n.º 2
0
        public WIPStateMachine(StationaryLocomotion locomotion, WalkInPlace wip)
        {
            m_WIPState = new WIPState(this, locomotion, wip);
            m_States   = new WIPPhase[]
            {
                new Stationary(m_WIPState),
                new BeginUpMove(m_WIPState),
                new TurnDirection(m_WIPState),
                new BeginDownMove(m_WIPState),
                new EndStep(m_WIPState),
                new SmoothEndStep(m_WIPState),
            };

            m_Current = m_States[0];
        }