initial main menu and dependencies
This commit is contained in:
1 parent
2cdb2aa43d
commit
61af80957c
834 files changed
+402699
No files matched your search
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.UI
|
||||
{
|
||||
public class MainMenuController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Button playButton;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
playButton.onClick.AddListener(LoadGameplay);
|
||||
}
|
||||
|
||||
private void LoadGameplay()
|
||||
{
|
||||
SceneManager.LoadScene("Gameplay");
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
playButton.onClick.RemoveAllListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user