Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        sceneLoader = GetComponent <SceneLoader>();
        rt          = GetComponent <RectTransform>();

        AudioManager.instance?.Playmusic(Music.museum, .5f);

        StartCoroutine(fadeImage.FadeTo(1, 0, 1f));
    }
Exemplo n.º 2
0
    IEnumerator Fail()
    {
        AudioManager.instance?.PlaySound(AudioEffect.fail);

        yield return(StartCoroutine(fadeImage.FadeTo(0, 1, 0.5f)));

        GetComponent <SceneLoader>().ReloadScene();
    }