27 lines
743 B
C#
27 lines
743 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class AggregateStation : MonoBehaviour
|
|
{
|
|
|
|
//public SpriteRenderer instruct;
|
|
public TMP_Text countInfo;
|
|
public TMP_Text dataInfo;
|
|
public bool isHaveValue;
|
|
//public void SetInfo(Sprite stationIcon, string num)
|
|
//{
|
|
// //instruct.sprite = stationIcon;
|
|
// //instructInfo.text = num;
|
|
//}
|
|
public void SetInfo(string num, string data)
|
|
{
|
|
string cityName = transform.parent.name.Substring(0, 2);
|
|
countInfo.text = $"{cityName}({num})";
|
|
dataInfo.text = $"{data}<size=15>MW</size>";
|
|
gameObject.SetActive(num != "0");
|
|
isHaveValue = num != "0" ? true : false;
|
|
}
|
|
}
|