/// <summary> /// Uns the pause game. /// Unpauses the game by enabling animation and control on both characters. /// </summary> public void UnPauseGame() { paused = false; pauseBackgroundToggel.DeSelect(); pauseMenu.SetActive(false); GameObject.Find("Character 1").GetComponent <InputController> ().UnPause(); GameObject.Find("Character 2").GetComponent <InputController> ().UnPause(); GameObject.Find("Character 1").GetComponent <Rigidbody2D>().gravityScale = 1; GameObject.Find("Character 2").GetComponent <Rigidbody2D>().gravityScale = 1; }
public static IEnumerator ChangeToDefaultColorAfterTime(ColorModifier colorModifier, float time) { yield return(new WaitForSeconds(time)); colorModifier.DeSelect(); }