public void ChangeState(IEntityState newState) { if (currentState != null && currentState.WillStop()) { currentState.Stop(); } currentState = newState; currentState.Enter(); }
public void ChangeState(IEntityState newState) { if (currentState != null && currentState.WillStop()) { currentState.Stop(); } currentState = newState; currentState.Enter(); }