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
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
Debug.Log(transform.position.x);
|
GetComponent<RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, Mathf.Min(100*(Time.fixedTime-player.lastAttackTime)/player.attackCooldownSeconds, 100));
|
||||||
//bar.x=200*(Time.fixedTime-player.lastAttackTime)/player.attackCooldownSeconds;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user