示例#1
0
        protected override void UpdateShow()
        {
            NormalInfoData data = GetData <NormalInfoData>();

            transform.Find("Name").GetComponent <Text>().text  = data.Name;
            transform.Find("Age").GetComponent <Text>().text   = data.Age.ToString();
            transform.Find("Count").GetComponent <Text>().text = data.Count.ToString();
        }
示例#2
0
 public void UpdataData(IData newData)
 {
     data = (NormalInfoData)newData;
     if (UpdateShow != null)
     {
         UpdateShow();
     }
 }
示例#3
0
 protected override void Init()
 {
     base.Init();
     InitUI(EUiId.DIALOG, NormalInfoDataHandler.NAME);
     UITool.AddBtnListener(transform, () => { AppUIRoot.UIManager.Back(); }, "Back");
     UITool.AddBtnListener(transform, () => { AppUIRoot.UIManager.ShowUI(EUiId.VIEW_ONE); }, "One");
     UITool.AddBtnListener(transform, () => { AppUIRoot.UIManager.ShowUI(EUiId.SIDE_VIEW); }, "Side");
     UITool.AddBtnListener(transform, () =>
     {
         NormalInfoData data = GetData <NormalInfoData>();
         data.Count++;
         dataHandler.UpdataData(data);
     }, "Count");
 }
示例#4
0
 protected override void Init()
 {
     base.Init();
     InitUI(EUiId.VIEW_ONE, NormalInfoDataHandler.NAME);
     UITool.AddBtnListener(transform, () => { AppUIRoot.UIManager.Back(); }, "Back");
     UITool.AddBtnListener(transform, () => { AppUIRoot.UIManager.ShowUI(EUiId.VIEW_TWO); }, "Two");
     UITool.AddBtnListener(transform, () => { AppUIRoot.UIManager.ShowUI(EUiId.MAIN_UI); }, "Main");
     UITool.AddBtnListener(transform, () =>
     {
         NormalInfoData data = GetData <NormalInfoData>();
         data.Count++;
         dataHandler.UpdataData(data);
     }, "Count");
 }
示例#5
0
 public void InitData()
 {
     data = new NormalInfoData("BlueMonk", 28, 1);
 }