Example #1
0
        public void LoadGame()
        {
            Level.LoadLevelAsync("Game").RunWithDelay(10f);

            AudioMixer.ChangeFloatOverTime("musicPitch", 0.4f, 3f).Run();
            AudioMixer.ChangeVolumeOverTime("sfxVolume", 0.0f, 3f).Run();
            AudioMixer.ChangeVolumeOverTime("musicVolume", 0.0f, 1f).RunWithDelay(3f);

            AudioSource.ChangeClip(GameTrack, () => AudioSource.time = 15f).RunWithDelay(4f);
            AudioMixer.ChangeVolumeOverTime("musicVolume", 1f, 4f).RunWithDelay(6f);

            ScreenFading.Instance.FadeInOut(FadeDirection.In, 1f).Run();
        }