summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/ProductionBar.cs
blob: 2f838a1558c6efaf11a85063c717f42e5952c3a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using MPUIKIT;
using UnityEngine;

public class ProductionBar : MonoBehaviour
{
	[SerializeField]
	private GameObject canvasParent;

	[SerializeField]
	private MPImage fill;

	private float fillAmount = -1f;

	public void UpdateVisual(float _fillAmount)
	{
		if (fillAmount != _fillAmount)
		{
			canvasParent.SetActive(_fillAmount > 0f);
			fill.fillAmount = _fillAmount;
			fillAmount = _fillAmount;
		}
	}
}