character controller is working
This commit is contained in:
1 parent
c12d653cbc
commit
43ddb1b3b5
460 files changed
+613
-115269
No files matched your search
@@ -0,0 +1,26 @@
|
||||
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