add basic UI to player

This commit is contained in:
2026-05-05 22:13:38 +02:00
parent c845ef3b9c
commit 68c82eeee1
4 changed files with 299 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
using TMPro;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
[SerializeField] private TMP_Text statsDispaly;
private float time;
private int kills;
public void IncrementKills()
{
kills++;
}
void FixedUpdate()
{
time += Time.fixedDeltaTime;
statsDispaly.SetText($"Time: {time:F0}s | Kills: {kills}");
}
}