public void OnStateMachineUpdate() { GunsState oldState = state; state = state.OnUpdateState(); if (oldState != state) { oldState.OnExitState(); state.Initialize(this); state.OnEnterState(); } }
public void Initialize(GunsState newState) { state = newState; state.Initialize(this); state.OnEnterState(); }