Beispiel #1
0
 public static void PauseGame(EPauseFrom from)
 {
     Debug.Log("PauseGame:" + from);
     SetPauseState(from, true);
     if (_stateFrom != EPauseFrom.None)
     {
         TimeScaleManager.SetTimeScaleForPause(0f);
     }
 }
Beispiel #2
0
    public static void DoContionueGame(EPauseFrom from)
    {
        Debug.Log("DoContionueGame:" + from + " " + _stateFrom);
        SetPauseState(from, false);

        if (_stateFrom == EPauseFrom.None)
        {
            TimeScaleManager.SetTimeScaleForPause(1);
        }
    }
Beispiel #3
0
 public static void SetPauseState(EPauseFrom state, bool b)
 {
     if (b)
     {
         _stateFrom |= state;
     }
     else
     {
         _stateFrom &= ~state;
     }
 }
Beispiel #4
0
 public static void Revert()
 {
     _stateFrom = EPauseFrom.None;
     TimeScaleManager.SetTimeScaleForPause(1);
 }