예제 #1
0
    /// <summary>
    /// Pauses the game, play defeat music and actives every GUI DefeatScreen element.
    /// <seealso cref="GUIController.ActiveDefeatScreen"/>
    /// </summary>
    public void LoadDefeatScene()
    {
        PauseEvent(true);
        AudioSource audioSource = gameObject.GetComponent <AudioSource>();

        audioSource.clip = defeatMusic;
        audioSource.loop = false;
        audioSource.Play();

        guiController.ActiveDefeatScreen();
    }