Beispiel #1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space) && !begun)
     {
         BeginGame();
         levelImage.SetActive(false);
         controlText.SetActive(false);
         titleText.SetActive(false);
         spaceText.SetActive(false);
         begun = true;
     }
     else if (Input.GetKeyDown(KeyCode.Space) && begun)
     {
         ReStartGame();
         levelImage.SetActive(false);
         controlText.SetActive(false);
         titleText.SetActive(false);
         spaceText.SetActive(false);
         if (winText.activeInHierarchy)
         {
             winText.SetActive(false);
         }
         eyeInstance = GameObject.FindGameObjectWithTag("Eye").GetComponent <Eye> ();
         eyeInstance.EyeEnder();
     }
 }