Beispiel #1
0
    void Update()
    {
        //Rotate Sky
        RenderSettings.skybox.SetFloat("_Rotation", Time.time * 1.2f);

        //Particle System Control
        if (Input.GetKeyDown("p"))

        {
            partbool = !partbool;

            if (partbool)
            {
                Part1.SetActive(true);
                Part2.SetActive(true);
            }
            else
            {
                Part1.SetActive(false);
                Part2.SetActive(false);
            }
        }

        //exit on escape
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.Quit();
            Debug.Log("Exit");
        }
    }
Beispiel #2
0
 public void NextLVL()
 {
     CurrentLVL++;
     AmmoRemaining = 3;
     if (CurrentLVL == 2)
     {
         Part1.SetActive(false);
         Part2.SetActive(true);
         Part3.SetActive(false);
     }
     if (CurrentLVL == 4)
     {
         Part1.SetActive(false);
         Part2.SetActive(false);
         Part3.SetActive(true);
     }
     if (CurrentLVL == 7)
     {
         SceneManager.LoadScene(2);
     }
 }