Beispiel #1
0
 /// <summary>
 /// Called when pause state has changed
 /// </summary>
 /// <param name="pause"></param>
 void OnPause(Events.IPause pause)
 {
     enabled = !pause.State;
     if (pause.State)
     {
         savedSpeed           = rigidbody2D.velocity;
         rigidbody2D.velocity = Vector2.zero;
         frozen = true;
         SetConstraints();
     }
     else
     {
         frozen = false;
         SetConstraints();
         rigidbody2D.velocity = savedSpeed;
     }
 }
Beispiel #2
0
 void OnPause(Events.IPause pause)
 {
     paused = pause.State;
 }
Beispiel #3
0
 void OnPause(Events.IPause obj)
 {
     enabled = !obj.State;
 }
Beispiel #4
0
 void onGamePause(Events.IPause obj)
 {
     StartCoroutine(PauseBMGSound(obj.State));
     StartCoroutine(PauseSFXSound(obj.State));
 }