public void ChangeState(State nextState) { if (CurrentState != null) { CurrentState.Exit(m_owner); m_previousState = CurrentState; CurrentState = nextState; CurrentState.Enter(m_owner); } }
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 }
public void Initialize() { CurrentState = EntityStateStand.Get(); }