Example #1
0
 public void ChangeState(State nextState)
 {
     if (CurrentState != null)
     {
         CurrentState.Exit(m_owner);
         m_previousState = CurrentState;
         CurrentState = nextState;
         CurrentState.Enter(m_owner);
     }
 }
Example #2
0
        public void ChangeState(State nextState)
        {
            m_entityStateMgr.ChangeState(nextState);

            // TODO: update entity properties based on new state
            //       or should this be in a seperate entity method that the state calls?
            //       does it matter?  -- maybe it does -- so the state has more 'control' over the entity
        }
Example #3
0
 public void Initialize()
 {
     CurrentState = EntityStateStand.Get();
 }