Example #1
0
 public void ResetGame(int Index)
 {
     if (Index == 0)
     {
         SceneManager.LoadScene(0);
         Level.SetActive(false);
         IngameUI.SetActive(false);
         EndUI.SetActive(false);
         HowtoUI1.SetActive(true);
         Howtoui2.SetActive(false);
         WhoWon.player1win = false;
         WhoWon.player2win = false;
     }
     else
     {
         Application.Quit();
     }
 }
Example #2
0
 void CamMovement()
 {
     IngameUI.SetActive(false);
     if (Camera.main.orthographicSize >= 1 && !done)
     {
         camAnim.enabled = false;
         Camera.main.orthographicSize   = Vector3.Lerp(Vector3.right * Camera.main.orthographicSize, Vector3.right, 0.05f).x;
         Camera.main.transform.position = Vector3.Lerp(Camera.main.transform.position, new Vector3(player.transform.position.x, player.transform.position.y, -10), 0.05f);
     }
     if (Camera.main.orthographicSize <= 1.01f)
     {
         done            = true;
         camAnim.enabled = true;
         GOPanel.SetActive(true);
         GOTimerText.text = inGameTimerText.text;
         GOScoreText.text = inGameScoreText.text;
     }
 }
Example #3
0
 /// <summary>
 /// Toggles the UI on the ground
 /// </summary>
 public override void SetIngameUIVisible()
 {
     EnableIngameMenu = true;
     IngameUI.SetActive(true);
 }