public virtual void OnFocusEnd() { #if LOG_STATE_CHANGES Debug.LogColor(name + " :: OnFocusEnd, frame " + Time.frameCount, Color.magenta, this); #endif Debug.Assert(_activationLevel == ActivationLevel.Focused, this); _activationLevel = ActivationLevel.Active; GlobalGameEvents.Dispatch<GameEventGameStateChanged>(new GameEventGameStateChanged() { Context = this, GameState = this, EventType = GameEventGameStateChanged.Type.EndFocus }); }
public virtual void OnActiveStart() { #if LOG_STATE_CHANGES Debug.LogColor(name + " :: OnActiveStart, frame " + Time.frameCount, Color.green, this); #endif Debug.Assert(_activationLevel == ActivationLevel.None, this); _activationLevel = ActivationLevel.Active; GlobalGameEvents.Dispatch<GameEventGameStateChanged>(new GameEventGameStateChanged() { Context = this, GameState = this, EventType = GameEventGameStateChanged.Type.StartActive }); }