12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using UnityEngine;
- using UnityEngine.UI;
- using static System.Net.Mime.MediaTypeNames;
- namespace ET.Client
- {
- [FriendOf(typeof(UIRealNameAuthenComponent))]
- public static class UIRealNameAuthenComponentSystem
- {
- [ObjectSystem]
- public class UIRealNameAuthenComponentAwakeSystem : AwakeSystem<UIRealNameAuthenComponent>
- {
- protected override void Awake(UIRealNameAuthenComponent self, params object[] param)
- {
- ReferenceCollector rc = self.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
- self.realNameObj = rc.Get<GameObject>("RealNameObj");
- self.unRealNameObj = rc.Get<GameObject>("unRealNameObj");
- self.yourName = rc.Get<GameObject>("yourName");
- self.yourAddress = rc.Get<GameObject>("yourAddress");
- self.nameInput = rc.Get<GameObject>("nameInput");
- self.addressInput = rc.Get<GameObject>("addressInput");
- self.sureBtn = rc.Get<GameObject>("sureBtn");
- self.sureBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnSureBtn(); });
- self.Init();
- }
- }
- private static void Init(this UIRealNameAuthenComponent self)
- {
- self.unRealNameObj.SetActive(false);
- self.realNameObj.SetActive(true);
- }
- public static async void OnSureBtn(this UIRealNameAuthenComponent self)
- {
- await SoundManager.Instance.PlaySound("clickbtnsound");
- self.OnCloseAsync();
- }
- public static async void OnCloseAsync(this UIRealNameAuthenComponent self)
- {
- await UIHelper.Remove(self.ClientScene(),UIType.UIRealNameAuthen);
- }
- }
- }
|