Пример #1
0
        void Start()
        {
            audioMixer.SetFloat("masterVolume", Mathf.Log10(PlayerPrefs.GetFloat("MasterVolume", 0f)) * 20);

            audioMixer.SetFloat("musicVolume", Mathf.Log10(PlayerPrefs.GetFloat("MusicVolume", 0f)) * 20);

            audioMixer.SetFloat("soundEffectsVolume", Mathf.Log10(PlayerPrefs.GetFloat("SoundEffectsVolume", 0f)) * 20);

            levelChanger = FindObjectOfType <LevelChanger>();
        }
Пример #2
0
        void Start()
        {
            levelChanger = FindObjectOfType <LevelChanger>();

            if (phase == 1)
            {
                FindObjectOfType <DialogueRunner>().StartDialogue("Introduction.Phase1");
            }
            else if (phase == 4)
            {
                FindObjectOfType <DialogueRunner>().StartDialogue("Introduction.Phase4");
            }
        }
Пример #3
0
        void Start()
        {
            levelChanger = FindObjectOfType <LevelChanger>();
            string actualScene;

            actualScene = SceneManager.GetActiveScene().name;

            if (actualScene.Equals(scene))
            {
                deaths += 1;
                if (scene.Equals("Scene2D"))
                {
                    if (deaths == 1)
                    {
                        FindObjectOfType <DialogueRunner>().StartDialogue("Phase1.Death1");
                    }
                    else
                    {
                        FindObjectOfType <DialogueRunner>().StartDialogue("Phase1.Death2");
                    }
                }
                else if (scene.Equals("BossPhase"))
                {
                    if (deaths == 1)
                    {
                        FindObjectOfType <DialogueRunner>().StartDialogue("Phase4.Death1");
                    }
                    else if (deaths == 2)
                    {
                        FindObjectOfType <DialogueRunner>().StartDialogue("Phase4.Death2");
                    }
                    else
                    {
                        FindObjectOfType <DialogueRunner>().StartDialogue("Phase4.Death3");
                    }
                }
            }
            else
            {
                deaths = 0;
                scene  = actualScene;
            }
        }
Пример #4
0
 void Start()
 {
     levelChanger = FindObjectOfType <LevelChanger>();
 }