25 lines
599 B
C#
25 lines
599 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
using System;
|
|
|
|
public class popUp : UIController
|
|
{
|
|
public string content;
|
|
public Action ac;
|
|
[SerializeField] Button Btn;
|
|
[SerializeField] List<TextMeshProUGUI> text;
|
|
public void init()
|
|
{
|
|
var tempStr = content.Split(',');
|
|
for (int i = 0; i < tempStr.Length; i++)
|
|
{
|
|
text[i].text = tempStr[i];
|
|
}
|
|
text[text.Count - 1].text = tempStr[tempStr.Length - 1];
|
|
Btn.onClick.AddListener(()=>ac?.Invoke());
|
|
}
|
|
}
|