32 lines
661 B
C#
32 lines
661 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UITIPData : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI[] textMeshProUGUIs;
|
|
public List<string> Datas = new List<string>();
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
public void DatShow()
|
|
{
|
|
for (int i = 0; i < textMeshProUGUIs.Length; i++)
|
|
{
|
|
if (i < Datas.Count)
|
|
textMeshProUGUIs[i].text = Datas[i];
|
|
}
|
|
}
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (Input.GetMouseButtonUp(0))
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|