/// <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; } }
void OnPause(Events.IPause pause) { paused = pause.State; }
void OnPause(Events.IPause obj) { enabled = !obj.State; }
void onGamePause(Events.IPause obj) { StartCoroutine(PauseBMGSound(obj.State)); StartCoroutine(PauseSFXSound(obj.State)); }