Files
HelixJump/Assets/Scripts/UI/StartScreenController.cs
2025-12-12 16:16:37 -08:00

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;
}
}