Attack cooldown bar below player (doesn't work yet)

This commit is contained in:
2024-10-21 18:04:54 -07:00
parent b784c9a3eb
commit 36b288b23c

View File

@@ -3,15 +3,18 @@ using UnityEngine;
public class AttackCooldown : MonoBehaviour
{
Teo player;
TMPro.TMP_Sprite bar;
UnityEngine.UI.Image bar;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GameObject.FindGameObjectWithTag("Player").GetComponent<Teo>();
bar = GetComponent<UnityEngine.UI.Image>();
}
// Update is called once per frame
void Update()
{
Debug.Log(transform.position.x);
//bar.x=200*(Time.fixedTime-player.lastAttackTime)/player.attackCooldownSeconds;
}
}