public static void PauseGame(EPauseFrom from) { Debug.Log("PauseGame:" + from); SetPauseState(from, true); if (_stateFrom != EPauseFrom.None) { TimeScaleManager.SetTimeScaleForPause(0f); } }
public static void DoContionueGame(EPauseFrom from) { Debug.Log("DoContionueGame:" + from + " " + _stateFrom); SetPauseState(from, false); if (_stateFrom == EPauseFrom.None) { TimeScaleManager.SetTimeScaleForPause(1); } }
public static void SetPauseState(EPauseFrom state, bool b) { if (b) { _stateFrom |= state; } else { _stateFrom &= ~state; } }
public static void Revert() { _stateFrom = EPauseFrom.None; TimeScaleManager.SetTimeScaleForPause(1); }