Пример #1
0
 public void LoadGameWithLevel()
 {
     PlayerPrefs.SetInt("levelToLoad", LevelSelection);
     BoolPrefs.SetBool("isTimeAttack", false);
     PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber);
     SceneManager.LoadScene(loadSceneNumber);
 }
Пример #2
0
 public void LoadTimeAttackGame()
 {
     PlayerPrefs.SetInt("levelToLoad", 0);
     //SceneManager.LoadScene(timeAttackSceneNumber);
     BoolPrefs.SetBool("isTimeAttack", true);
     PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber);
     SceneManager.LoadScene(loadSceneNumber);
 }
Пример #3
0
    void BackToMainMenu()
    {
        PlayerPrefs.SetFloat("SFX", SFX.value);
        PlayerPrefs.SetFloat("Music", Music.value);
        BoolPrefs.SetBool("Vibration", Vibration.isOn);

        SceneManager.LoadScene("MainMenu");
    }
Пример #4
0
    public void LoadNextLevelGame()
    {
        int NextLevel = PlayerPrefs.GetInt("levelToLoad") + 1;

        PlayerPrefs.SetInt("levelToLoad", NextLevel);
        BoolPrefs.SetBool("isTimeAttack", false);
        PlayerPrefs.SetInt("sceneToLoad", timeAttackSceneNumber);
        SceneManager.LoadScene(loadSceneNumber);
    }
Пример #5
0
 public override void Set_Unlocked(bool newBool)
 {
     unlocked = newBool;
     BoolPrefs.SetBool("Reaper Unlocked", unlocked);
 }
Пример #6
0
    // 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;
                    }
                }
            }
        }
    }
Пример #7
0
 public override void Set_Unlocked(bool newBool)
 {
     unlocked = newBool;
     BoolPrefs.SetBool("Crimson Knight Unlocked", unlocked);
 }