Example #1
0
 private void PauseGame()
 {
     Time.timeScale = Time.timeScale == 1 ? 0 : 1; //ternary operator for the speed that time runs at
     if (Time.timeScale == 0)
     {
         if (InstructionsUI.transform.position.y > 40) //out of the way?
         {
             Tips.GetComponent <Text>().text = GetTip();
             Tips.SetActive(true);
         }
         PauseScreen.SetActive(true);
     }
     else
     {
         PauseScreen.SetActive(false);
         Tips.SetActive(false);
     }
 }