void Update() { IGuardState newState = state.Update(); if (newState != null) { state.Exit(); state = newState; state.Enter(this); } }