summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/ProductionBar.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_v1.0/Decompile/ProductionBar.cs')
-rw-r--r--Thronefall_v1.0/Decompile/ProductionBar.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Thronefall_v1.0/Decompile/ProductionBar.cs b/Thronefall_v1.0/Decompile/ProductionBar.cs
new file mode 100644
index 0000000..2f838a1
--- /dev/null
+++ b/Thronefall_v1.0/Decompile/ProductionBar.cs
@@ -0,0 +1,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;
+ }
+ }
+}