123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using UnityEngine;
- using UnityEngine.UI;
- using ET;
- namespace ET.Client
- {
- [FriendOf(typeof(UIMainComponent))]
- public static class UIMainComponentSystem
- {
- [ObjectSystem]
- public class UIMainComponentAwakeSystem : AwakeSystem<UIMainComponent>
- {
- protected override void Awake(UIMainComponent self)
- {
- ReferenceCollector rc = self.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
- self.guildBtn = rc.Get<GameObject>("GuildBtn");
- self.guildBtn.GetComponent<Button>().onClick.AddListener(()=> { self.OnGuild(); });
- self.bagBtn = rc.Get<GameObject>("BagBtn");
- self.bagBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnBag(); });
- self.startBtn = rc.Get<GameObject>("StartBtn");
- self.startBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnStart(); });
- self.featureBtn = rc.Get<GameObject>("FeatureBtn");
- self.featureBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnFeature(); });
- self.checkPointBtn = rc.Get<GameObject>("CheckPointBtn");
- self.checkPointBtn.GetComponent<Button>().onClick.AddListener(() => { self.OnCheckPoint(); });
- }
- }
-
- public static void OnGuild(this UIMainComponent self)
- {
- Log.Error("OnGuild");
- }
- public static void OnBag(this UIMainComponent self)
- {
- Log.Error("OnBag");
- }
- public static void OnStart(this UIMainComponent self)
- {
- Log.Error("OnStart");
- }
- public static void OnFeature(this UIMainComponent self)
- {
- Log.Error("OnFeature");
- }
- public static void OnCheckPoint(this UIMainComponent self)
- {
- Log.Error("OnCheckPoint");
- }
- }
- }
|