43 lines
759 B
C#
43 lines
759 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class GetDropRodPanel : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Text keyText;
|
|
|
|
[SerializeField]
|
|
private Text infoText;
|
|
|
|
[SerializeField]
|
|
private Image[] buttonsImage;
|
|
|
|
public Image circleImage;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
public void Set(string info, string key, int imageIndex = 0)
|
|
{
|
|
for (int i = 0; i < buttonsImage.Length; i++)
|
|
{
|
|
buttonsImage[i].gameObject.SetActive(value: false);
|
|
}
|
|
if (GameManager.Instance.controllerType == GameManager.ControllerType.GamePad)
|
|
{
|
|
buttonsImage[imageIndex].gameObject.SetActive(value: true);
|
|
}
|
|
else
|
|
{
|
|
buttonsImage[0].gameObject.SetActive(value: true);
|
|
}
|
|
keyText.text = key;
|
|
infoText.text = info;
|
|
}
|
|
}
|