Files
blackhole-escape/Assets/Scripts/Other Scripts/RuleMenu.cs
iDunnoDev 0360907df1 Added Main menu Changes to UI
Added Rules Menu Changes to UI
Added Cutscenes to the rules scene
Reorganised Files
2022-06-22 13:30:58 +01:00

29 lines
750 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class RuleMenu : MonoBehaviour
{
public BackgroundMusicManager currentBGMManager;
public MenuAudioManager currentMenuAudioManager;
private void Start()
{
// If the BGM manager is present, queue up and play the given track index
if (currentBGMManager)
{
currentBGMManager.StartAudioQueueAndPlay(0);
}
}
public void StartGame()
{
// Play the menu click sound if the audio manager is present
if (currentMenuAudioManager)
{
currentMenuAudioManager.PlayMenuClick();
}
SceneManager.LoadScene("Game");
}
}