Что я сдал
This commit is contained in:
1 parent
24b1157026
commit
a5665f0101
2838 files changed
+129953
-1304
No files matched your search
@@ -0,0 +1,27 @@
|
||||
using Code.GameplayServices;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.UI
|
||||
{
|
||||
public class StartGamePanel : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Button startGameButton;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
startGameButton.onClick.AddListener(RestartGame);
|
||||
}
|
||||
|
||||
private void RestartGame()
|
||||
{
|
||||
GameplayManager.Instance.RestartGame();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
startGameButton.onClick.RemoveListener(RestartGame);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user