public void LoadGameWithLevel() { PlayerPrefs.SetInt("levelToLoad", LevelSelection); BoolPrefs.SetBool("isTimeAttack", false); PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber); SceneManager.LoadScene(loadSceneNumber); }
public void LoadTimeAttackGame() { PlayerPrefs.SetInt("levelToLoad", 0); //SceneManager.LoadScene(timeAttackSceneNumber); BoolPrefs.SetBool("isTimeAttack", true); PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber); SceneManager.LoadScene(loadSceneNumber); }
void BackToMainMenu() { PlayerPrefs.SetFloat("SFX", SFX.value); PlayerPrefs.SetFloat("Music", Music.value); BoolPrefs.SetBool("Vibration", Vibration.isOn); SceneManager.LoadScene("MainMenu"); }
public void LoadNextLevelGame() { int NextLevel = PlayerPrefs.GetInt("levelToLoad") + 1; PlayerPrefs.SetInt("levelToLoad", NextLevel); BoolPrefs.SetBool("isTimeAttack", false); PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber); SceneManager.LoadScene(loadSceneNumber); }
public override void Set_Unlocked(bool newBool) { unlocked = newBool; BoolPrefs.SetBool("Reaper Unlocked", unlocked); }
// Update is called once per frame void Update() { if (runGameplayTutorial) { for (int i = 0; i < gameplayTutorialSequence.Length; i++) { if (i != counter) { gameplayTutorialSequence [i].SetActive(false); } else { gameplayTutorialSequence [i].SetActive(true); } } } else { for (int i = 0; i < tutorialSequence.Length; i++) { if (i != counter) { tutorialSequence [i].SetActive(false); } else { tutorialSequence [i].SetActive(true); } } } //end of tutorial if (runGameplayTutorial) { if (counter == gameplayTutorialSequence.Length) { BoolPrefs.SetBool("Seen Tutorial", true); SceneManager.LoadScene("Town"); loadingScreen.SetActive(false); } } else { if (counter == tutorialSequence.Length) { loadingScreen.SetActive(true); scene = SceneManager.GetActiveScene(); if (scene.name == "TownTutorial") { SceneManager.LoadScene("Tutorial"); } else if (scene.name == "Tutorial") { distance = Mathf.Sqrt((float)(enemy.transform.position.x - attackCollider.transform.position.x) * (enemy.transform.position.x - attackCollider.transform.position.x)); Time.timeScale = 1; if (distance <= 0.5f) { Time.timeScale = 0; counter = 0; runGameplayTutorial = true; } } } } }
public override void Set_Unlocked(bool newBool) { unlocked = newBool; BoolPrefs.SetBool("Crimson Knight Unlocked", unlocked); }