summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/Thronefall/SelectUnitUI.cs
blob: 82863c72de9e72b9e8ccbab62cdc0741abd7aa4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using MPUIKIT;
using UnityEngine;
using UnityEngine.UI;

public class SelectUnitUI : MonoBehaviour
{
	[SerializeField]
	private GameObject canvas;

	[SerializeField]
	private Image image;

	[SerializeField]
	private MPImage mpImage;

	private bool animating;

	public void UpdateState(bool visible, Sprite sprite, float selectProgress)
	{
		if (selectProgress > 0.99f)
		{
			visible = false;
		}
		canvas.SetActive(visible);
		image.sprite = sprite;
		mpImage.fillAmount = selectProgress;
	}
}