37 lines
827 B
C#
37 lines
827 B
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class SetLocalText : MonoBehaviour
|
||
|
|
{
|
||
|
|
static List<Action> actionList = new List<Action>();
|
||
|
|
public static void Add_Action(Action _Act) { actionList.Add(_Act); }
|
||
|
|
public static void Run_Action()
|
||
|
|
{
|
||
|
|
for (int i = 0; i < actionList.Count; i++)
|
||
|
|
{
|
||
|
|
if (actionList[i] != null)
|
||
|
|
actionList[i].Invoke();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public int m_localtextKey;
|
||
|
|
|
||
|
|
TextMeshProUGUI m_Text;
|
||
|
|
|
||
|
|
private void Awake()
|
||
|
|
{
|
||
|
|
m_Text = GetComponent<TextMeshProUGUI>();
|
||
|
|
Set();
|
||
|
|
Add_Action(Set);
|
||
|
|
}
|
||
|
|
|
||
|
|
void Set()
|
||
|
|
{
|
||
|
|
if (table_localtext.Ins)
|
||
|
|
m_Text.text = table_localtext.Ins.Get_Text(m_localtextKey);
|
||
|
|
else
|
||
|
|
m_Text.text = "no table";
|
||
|
|
}
|
||
|
|
}
|