12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using GameFramework.Event;
- using GameFramework.WebRequest;
- using System.Collections;
- using System.Collections.Generic;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Serialization;
- using System.Text;
- using BestHTTP;
- using UnityEngine;
- using UnityEngine.UI;
- using UnityGameFramework.Runtime;
- using System;
- public class TipsForm : UIFormLogic
- {
- Text mText;
- protected override void OnInit(object userData)
- {
- base.OnInit(userData);
- InItUiComponent();
- }
- protected override void OnOpen(object userData)
- {
- base.OnOpen(userData);
- TipsData tipsData = (TipsData)userData;
- mText.text = tipsData.text;
- this.transform.SetAsLastSibling();
- //GameMain.Event.Subscribe(ChangeGameModeTypeEvent.EventId, OnChangeGameMode);
-
- }
- private void InItUiComponent()
- {
- mText = this.transform.Find("DoneTips/BG/Text").GetComponent<Text>();
- this.transform.Find("DoneTips/CloseBtn").GetComponent<Button>().onClick.AddListener(()=> {
- GameMain.UI.CloseUIForm(this.UIForm);
- });
- }
- protected override void OnClose(bool isShutdown, object userData)
- {
- base.OnClose(isShutdown, userData);
- // GameMain.Event.Unsubscribe(ChangeGameModeTypeEvent.EventId, OnChangeGameMode);
- }
- }
|