Files
CartoonFPS/Assets/Scripts/UIController.cs
SHOUTING_PIRATE 4c8592d0ab initial commit
2025-08-05 09:30:40 +01:00

26 lines
734 B
C#

using UnityEngine;
using TMPro;
public class UIController : MonoBehaviour
{
public TextMeshProUGUI currentAmmoText, remainingAmmoText; // Reference to the ammo text UI element
//public TextMeshProUGUI healthText; // Reference to the health text UI element
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void UpdateAmmoText(int currentAmmo, int remainingAmmo)
{
currentAmmoText.text = currentAmmo.ToString(); // Update the current ammo text
remainingAmmoText.text = "/" + remainingAmmo.ToString(); // Update the remaining ammo text
}
}