Added Main menu Changes to UI
Added Rules Menu Changes to UI Added Cutscenes to the rules scene Reorganised Files
This commit is contained in:
41
Assets/Scripts/Other Scripts/DeadMenu.cs
Normal file
41
Assets/Scripts/Other Scripts/DeadMenu.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class DeadMenu : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public BackgroundMusicManager currentBGMManager;
|
||||
public MenuAudioManager currentMenuAudioManager;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
|
||||
// If the BGM manager is present, queue up and play the given track index
|
||||
if (currentBGMManager)
|
||||
{
|
||||
currentBGMManager.StartAudioQueueAndPlay(1);
|
||||
}
|
||||
}
|
||||
|
||||
public void ReStartGame()
|
||||
{
|
||||
// Play the menu click sound if the audio manager is present
|
||||
if (currentMenuAudioManager)
|
||||
{
|
||||
currentMenuAudioManager.PlayMenuClick();
|
||||
}
|
||||
SceneManager.LoadScene("Main Menu");
|
||||
}
|
||||
public void Quit()
|
||||
{
|
||||
// Play the menu click sound if the audio manager is present
|
||||
if (currentMenuAudioManager)
|
||||
{
|
||||
currentMenuAudioManager.PlayMenuClick();
|
||||
}
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user