12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- using static Manager;
- public class JiLuItem : MonoBehaviour
- {
- public Text lv;
- public Text time;
- public Text dev;
- public Text type;
- public void setData(GaoJingItemData data)
- {
- lv.text = data.lv;
- time.text = data.time;
- dev.text = data.dev;
- type.text = data.type;
- switch (lv.text)
- {
- case "一般":
- lv.color = Color.green;
- break;
- case "严重":
- lv.color = Color.red;
- break;
- case "紧急":
- lv.color = Color.yellow;
- break;
- }
- switch (type.text)
- {
- case "待解决":
- type.color = Color.red;
- break;
- case "已解决":
- type.color = Color.green;
- break;
- }
- }
- }
|