summaryrefslogtreecommitdiff
path: root/GameCode/BlockRechargeUI.cs
blob: d2ad92a90f281dc3d59e4b766d6e5d737a76e1df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using UnityEngine;
using UnityEngine.UI;

public class BlockRechargeUI : MonoBehaviour
{
	private Block block;

	private Image img;

	private void Start()
	{
		img = GetComponentInChildren<Image>();
		block = GetComponentInParent<Block>();
	}

	private void Update()
	{
		img.fillAmount = block.counter / block.Cooldown();
	}
}