35 lines
796 B
C#
35 lines
796 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class MainMenu : MonoBehaviour
|
|
{
|
|
[SerializeField] private AK.Wwise.Event startGameEvent;
|
|
[SerializeField] private AK.Wwise.Event quitGameEvent;
|
|
|
|
public void StartGame()
|
|
{
|
|
Debug.Log("Start Game");
|
|
|
|
// Post Wwise event for starting the game
|
|
if (startGameEvent != null)
|
|
{
|
|
startGameEvent.Post(gameObject);
|
|
}
|
|
|
|
// Load the first scene (assuming it's named "Beach")
|
|
SceneManager.LoadScene("Beach");
|
|
}
|
|
|
|
public void QuitGame()
|
|
{
|
|
Debug.Log("Quit Game");
|
|
|
|
// Post Wwise event for quitting the game
|
|
if (quitGameEvent != null)
|
|
{
|
|
quitGameEvent.Post(gameObject);
|
|
}
|
|
|
|
Application.Quit();
|
|
}
|
|
} |