Exemplo n.º 1
0
    public void Start()
    {
        instance = this;
        DontDestroyOnLoad(gameObject);
        SceneManager.sceneLoaded += SceneLoaded;

        playingSource      = gameObject.AddComponent <AudioSource>();
        playingSource.clip = movieSceneClip;
        playingSource.loop = true;
        playingSource.outputAudioMixerGroup = musicMixer;

        otherSource      = gameObject.AddComponent <AudioSource>();
        otherSource.loop = true;
        otherSource.outputAudioMixerGroup = musicMixer;

        oneOff      = gameObject.AddComponent <AudioSource>();
        oneOff.loop = false;
        oneOff.outputAudioMixerGroup = sfxMixer;

        playingSource.Play();
    }
Exemplo n.º 2
0
    public void Quit()
    {
        MainSoundHandler.PlayClip(clip);

        StartCoroutine(QuitSoon());
    }
Exemplo n.º 3
0
 public void Play()
 {
     SceneManager.LoadScene("Level1");
     MainSoundHandler.PlayClip(clip);
 }