Attack cooldown indicator that grows below Teo
This commit is contained in:
@@ -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<RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, Mathf.Min(100*(Time.fixedTime-player.lastAttackTime)/player.attackCooldownSeconds, 100));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user