40 lines
753 B
C#
40 lines
753 B
C#
using UnityEngine;
|
|
using VContainer;
|
|
|
|
public class StartScreenController
|
|
{
|
|
private StartScreenView _view;
|
|
public bool hasGameStarted = false;
|
|
[Inject] GameScreenController gameScreenController;
|
|
|
|
public StartScreenController(StartScreenView view)
|
|
{
|
|
_view = view;
|
|
_view.playBtn.onClick.AddListener(OnPlayBtnClicked);
|
|
Debug.Log("Instance");
|
|
}
|
|
|
|
|
|
public void OnPlayBtnClicked()
|
|
{
|
|
_view.Hide();
|
|
hasGameStarted = true;
|
|
gameScreenController.ShowGameScreen();
|
|
}
|
|
|
|
public void ShowStartScreen()
|
|
{
|
|
|
|
_view.Show();
|
|
hasGameStarted = false;
|
|
|
|
}
|
|
|
|
public void HideStartScreen()
|
|
{
|
|
_view.Hide();
|
|
hasGameStarted = true;
|
|
|
|
}
|
|
}
|