IEnumerator SlowMotion()
    {
        GlobalController.EnterSlowMotion();
        yield return(new WaitForSecondsRealtime(duration));

        GlobalController.ExitSlowMotion();
    }
 override public void ActivateSwitch(bool b)
 {
     if (b)
     {
         if (duration > 0)
         {
             StartCoroutine(SlowMotion());
         }
         else
         {
             GlobalController.EnterSlowMotion();
         }
     }
     else
     {
         GlobalController.ExitSlowMotion();
     }
 }
Beispiel #3
0
 public void EnterSlowMotion()
 {
     GlobalController.EnterSlowMotion();
 }