61 lines
1.1 KiB
C#
61 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class Popup_Status : MonoBehaviour
|
|
{
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
|
|
[SerializeField]
|
|
List<TMP_Text> keys = new List<TMP_Text>();
|
|
|
|
[SerializeField]
|
|
List<TMP_Text> valuses = new List<TMP_Text>();
|
|
|
|
[SerializeField]
|
|
TMP_Text title;
|
|
|
|
void Start()
|
|
{
|
|
title.text = "";
|
|
|
|
foreach(var key in keys)
|
|
{
|
|
key.text = "";
|
|
}
|
|
|
|
foreach(var val in valuses)
|
|
{
|
|
val.text = "";
|
|
}
|
|
}
|
|
|
|
|
|
public void SetTitle(string title)
|
|
{
|
|
this.title.text = title;
|
|
}
|
|
public void SetKeyName(List<string> keyNames)
|
|
{
|
|
for ( int i = 0; i < keyNames.Count; i++ )
|
|
{
|
|
keys[i].text = keyNames[i];
|
|
}
|
|
|
|
}
|
|
|
|
public void UpdateValue(List<string> values)
|
|
{
|
|
for (int i = 0; i < values.Count; i++)
|
|
{
|
|
valuses[i].text = values[i];
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|