12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- using System.Collections.Generic;
- public class CommentItem : Regist
- {
- public Text Tit;
- public Text ContentLab;
- public Text VisitLab;
- public Button VisitBtn;
- public string Content;
- public string SerialNumber;
- public override bool RegistImmed()
- {
- if (base.RegistImmed())
- {
- return true;
- }
- Dictionary<string, Transform> childDic = new Dictionary<string, Transform>();
- Auxiliary.CompileDic(transform, childDic);
- Tit = childDic["Tit"].GetComponent<Text>();
- VisitLab = childDic["VisitLab"].GetComponent<Text>();
- VisitBtn = childDic["VisitBtn"].GetComponent<Button>();
- ContentLab = childDic["ContentLab"].GetComponent<Text>();
- VisitLab.text = ManaReso.Get<Text>("C_CostLab").text;
- VisitBtn.onClick.AddListener(Visit);
- ManaCenter.OnLevelChange += () =>
- {
- VisitLab.text = ManaReso.Get<Text>("C_CostLab").text;
- };
- return false;
- }
- public void Visit()
- {
-
- }
- public void Reset(string serialNumber, string content)
- {
- Content = content;
- SerialNumber = serialNumber;
- Tit.text = "****" + serialNumber.Substring(serialNumber.Length-4);
- ContentLab.text = content;
- }
- }
|