Files
UltimateFishing2020/Assets/Scripts/Assembly-CSharp/ShowImageByControl.cs
2026-03-04 10:03:45 +08:00

30 lines
496 B
C#

using UnityEngine;
using UnityEngine.UI;
public class ShowImageByControl : MonoBehaviour
{
public GameManager.ControllerType showIfControlType;
private Image currentImage;
private void Start()
{
currentImage = GetComponent<Image>();
}
private void Update()
{
if (showIfControlType == GameManager.Instance.controllerType)
{
if (!currentImage.enabled)
{
currentImage.enabled = true;
}
}
else if (currentImage.enabled)
{
currentImage.enabled = false;
}
}
}