added gamescreen UI and simple start menu

This commit is contained in:
Mausham
2026-01-04 16:41:13 -08:00
parent dcf3bead16
commit 589260292c
508 changed files with 247792 additions and 516 deletions

View File

@@ -0,0 +1,45 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Darkmatter.Presentation
{
public class GameScreenView : MonoBehaviour
{
public TextMeshProUGUI fireableBulletText;
public TextMeshProUGUI remainingZombiesCountText;
public TextMeshProUGUI totalZombiesCountText;
public TextMeshProUGUI playerHealthText;
public GameObject GameOverObject;
public void UpdateBulletText(int bulletCount)
{
fireableBulletText.text = bulletCount.ToString();
}
public void UpdateRemainingZombiesCountText(int zombiesCount)
{
remainingZombiesCountText.text = zombiesCount.ToString();
}
public void UpdateTotalZombiesCount(int totalZombies)
{
totalZombiesCountText.text = totalZombies.ToString();
}
public void ShowPlayerHealth(int health)
{
playerHealthText.text = health.ToString();
}
public void ShowGameOver()
{
GameOverObject.SetActive(true);
Invoke("ChangeScene", 2f);
}
void ChangeScene()
{
SceneManager.LoadScene(0);
}
}
}