Attack cooldown works now

This commit is contained in:
2024-10-21 15:27:29 -07:00
parent 31ad45d6bd
commit bf1c9fe5da
10 changed files with 98 additions and 41 deletions

View File

@@ -0,0 +1,17 @@
using UnityEngine;
public class HealthIndicator : MonoBehaviour
{
Teo player;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GameObject.FindGameObjectWithTag("Player").GetComponent<Teo>();
}
// Update is called once per frame
void Update()
{
GetComponent<TMPro.TMP_Text>().text = "Health: "+player.health+"/"+player.maxHealth;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d13803709cc4d9259a92b5dc9f49fe05

View File

@@ -1,17 +0,0 @@
using UnityEngine;
public class healthIndicator : MonoBehaviour
{
GameObject player;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GameObject.FindGameObjectWithTag("Player");
}
// Update is called once per frame
void Update()
{
GetComponent<TMPro.TMP_Text>().text = "Health: "+player.GetComponent<Teo>().health.ToString()+"/100";
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 07e7096bcd8103c3faadeefc30c8a2f4