public void ShowNextSection() { if (levelCount == 1) { Level1Player.GetComponent <PlayerMovement>().MovementEnabled = false; Level1Player.GetComponent <Rigidbody>().isKinematic = true; SwitchSound.Play(); Level2.SetActive(true); Level2Player.GetComponent <PlayerMovement>().MovementEnabled = true; levelCount++; } else if (levelCount == 2) { Level2Player.GetComponent <PlayerMovement>().MovementEnabled = false; SwitchSound.Play(); Level3.SetActive(true); Level3Player.GetComponent <PlayerMovement>().MovementEnabled = true; levelCount++; } else { BaseCam.SetActive(true); BackgroundMusic.Stop(); SceneManager.LoadScene("ZiedNextLevel", LoadSceneMode.Single); } }
public void ButtonSelect(int ButtonVal) { if (ButtonVal == 1) { SceneManager.LoadScene(1); } else if (ButtonVal == 2) { Level1.SetActive(true); Level2.SetActive(true); Level3.SetActive(true); } else if (ButtonVal == 3) { Debug.Log("exit"); Application.Quit(); Debug.Log("exit1"); } else if (ButtonVal == 4) { Debug.Log("settings"); Sound1.SetActive(true); Sound2.SetActive(true); } else if (ButtonVal == 5) { PlayerPrefs.SetInt("sesKontrol", 1); Debug.Log("seson"); Sound.SetActive(true); } else if (ButtonVal == 6) { PlayerPrefs.SetInt("sesKontrol", 0); Debug.Log("sesoff"); Sound.SetActive(false); } else if (ButtonVal == 7) { PlayerPrefs.DeleteAll(); } }
public void ActivateLevel() { if (Level == 1) { Level0.SetActive(false); Level1.SetActive(true); Level2.SetActive(false); } else if (Level == 2) { Level2.SetActive(true); Level1.SetActive(false); } else { Level1.SetActive(false); Level2.SetActive(false); } }