Example #1
0
    public async void OpenMenu()
    {
        await Task.Delay(TimeSpan.FromSeconds(0.5f));

        audioSourceEffects.PlayOneShot(screenOnSound);
        animatorScreenEffect.FadeIn(async() => {
            await Task.Delay(TimeSpan.FromSeconds(0.5f));
            //animatorMusic.FadeIn();
            animatorPlanet.FadeIn();
            animatorMenuItems.FadeIn();
            audioSource.clip = menuMusic;
            audioSource.loop = true;
            audioSource.Play();
        });
    }
Example #2
0
    public async void StartIntro()
    {
        intro = true;
        await Task.Delay(TimeSpan.FromSeconds(2f));

        animatorIntroLogo.FadeIn();
        await Task.Delay(TimeSpan.FromSeconds(3.5f));

        animatorIntroLogo.FadeOut();
        await Task.Delay(TimeSpan.FromSeconds(1f));

        if (intro)
        {
            EndIntro();
        }
    }
Example #3
0
    public void StartGame()
    {
        if (startPressed || quitPressed)
        {
            return;
        }
        startPressed = true;
        audioSourceEffects.PlayOneShot(clickSound);

        animatorMenuItems.FadeOut();
        animatorPlanet.FadeOut(async() => {
            animatorLoading.FadeIn();
            await Task.Delay(TimeSpan.FromSeconds(1f));
            animatorGuide.FadeIn();
            await Task.Delay(TimeSpan.FromSeconds(1.1f));
            SceneManager.LoadSceneAsync("NoiseWorld", LoadSceneMode.Additive);
            await Task.Delay(TimeSpan.FromSeconds(1f));
            pressAnyKeyToContinue = true;
            animatorLoading.FadeOut();
            animatorPressAnyKeyToContinue.FadeIn();
        });
    }