From 1e3455b3a3b9a17157efe5ed95951135554acd98 Mon Sep 17 00:00:00 2001 From: ProtoSharkk Date: Mon, 21 Oct 2024 20:58:28 -0700 Subject: [PATCH] Attack cooldown indicator that grows below Teo --- Assets/UI overlay/AttackCooldown.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/UI overlay/AttackCooldown.cs b/Assets/UI overlay/AttackCooldown.cs index ac218cc..1f256bc 100644 --- a/Assets/UI overlay/AttackCooldown.cs +++ b/Assets/UI overlay/AttackCooldown.cs @@ -14,7 +14,6 @@ public class AttackCooldown : MonoBehaviour // Update is called once per frame void Update() { - Debug.Log(transform.position.x); - //bar.x=200*(Time.fixedTime-player.lastAttackTime)/player.attackCooldownSeconds; + GetComponent().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, Mathf.Min(100*(Time.fixedTime-player.lastAttackTime)/player.attackCooldownSeconds, 100)); } }