simple UI added

This commit is contained in:
Mausham
2025-12-11 18:20:42 -08:00
parent 60e58082ac
commit 2118bb7c36
576 changed files with 126744 additions and 13 deletions

View File

@@ -0,0 +1,39 @@
using System;
using UnityEngine;
using UnityEngine.SceneManagement;
using VContainer;
public class DeathScreenController
{
private DeathScreenView _view;
[Inject] private StartScreenController startScreenController;
public DeathScreenController(DeathScreenView view)
{
_view = view;
_view.backButton.onClick.AddListener(OnBackBtnClicked);
_view.rePlayButton.onClick.AddListener(OnReplayBtnClicked);
}
public void HideDeathScreen()
{
_view.Hide();
}
private void OnReplayBtnClicked()
{
HideDeathScreen();
SceneManager.LoadScene(0);
Debug.Log("Game Replayed");
}
private void OnBackBtnClicked()
{
HideDeathScreen();
SceneManager.LoadScene(0);
}
public void ShowDeathScreen(int score, int highscore)
{
_view.Show(score,highscore);
}
}