WinterJamSnowman/Assets/Scripts/MainMenuScript.cs

39 lines
726 B
C#
Raw Permalink Normal View History

2023-01-24 13:51:46 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Lemon.GenericLib.SceneManagement;
public class MainMenuScript : MonoBehaviour
{
public static MainMenuScript Instance;
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
if (Instance != this)
{
Destroy(gameObject);
}
}
//[Header("Runtime")]
//[Space]
[Header("Refereces")]
[SerializeField] private string mainMenuTrack;
private void Start() {
AudioManager2D.Instance.Play(mainMenuTrack);
}
public void HandlePlayButton()
{
SceneTransition.Instance.TransitionNextScene();
}
}