Beispiel #1
0
        public override void InitUI()
        {
            EventCenterComponent testEvent = Game.Scene.GetComponent <EventCenterComponent>();

            //Debug.Log(testEvent+"KKKKKKKKKKKKKKKKKK");
            // var main= thisForms as MainForms;
            testEvent.Test.AddListener(data =>
            {
                Text bt22 = GObj.transform.Find("EnterButton/Text").GetComponent <Text>();
                bt22.text = data.ToString();
            });
            Button bt = GObj.transform.Find("EnterButton").GetComponent <Button>();

            bt.onClick.Add(() =>
            {
                Debug.Log("HotFix的Button按钮事件触发");

                UI.Open <MarketForms>();
            });


            Button bt1 = GObj.transform.Find("backButton").GetComponent <Button>();

            bt1.onClick.Add(() =>
            {
                Debug.Log("HotFix的Button按钮事件触发");
                UI.Close <MainForms>();
            });
        }
Beispiel #2
0
        public override void InitUI()
        {
            Button bt = GObj.transform.Find("BtnEnter").GetComponent <Button>();

            bt.onClick.Add(() => {
                Debug.Log("HotFix的Button按钮事件触发");
                UI.Open <MainForms>();
            });

            Button bt1 = GObj.transform.Find("BtnBack").GetComponent <Button>();

            bt1.onClick.Add(() => {
                Debug.Log("HotFix的Button按钮事件触发");
                UI.Close <SelectHeroForms>();
            });
        }
Beispiel #3
0
        public override void InitUI()
        {
            EventCenterComponent testEvent = Game.Scene.GetComponent <EventCenterComponent>();

            testEvent.Test.Broadcast("258");
            Button bt = GObj.transform.Find("EnterButton").GetComponent <Button>();

            bt.onClick.Add(() => {
                Debug.Log("HotFix的Button按钮事件触发");
                UI.Open <GoodsInfoForms>();
            });

            Button bt1 = GObj.transform.Find("backButton").GetComponent <Button>();

            bt1.onClick.Add(() => {
                Debug.Log("HotFix的Button按钮事件触发");
                UI.Close <MarketForms>();
            });
        }
Beispiel #4
0
        public override void InitUI()
        {
            //base.InitUI();

            // GComponent gCmp = this.GObject.asCom;
            Transform btn = GObj.transform.Find("Panel/EnterMap");
            Button    bt  = btn.GetComponent <Button>();

            bt.onClick.Add(() => {
                Debug.Log("HotFix的Button按钮事件触发");
                UI.Open <SelectHeroForms>();
            });
            //注册事件
            //gCmp.GetChild("CreateRoomBtn").asButton.onClick.Add(OpenCreateRoomUI);
            //gCmp.GetChild("DaikaiBtn").asButton.onClick.Add(OpenDaikaiUI);
            //gCmp.GetChild("EnterRoomBtn").asButton.onClick.Add(EnterRoom);
            //gCmp.GetChild("n4").asButton.onClick.Add(() => { UI.Tip("有疑问请联系客服QQ535421993"); });
            //开始声音
            // SoundComponent.Instance?.PlayMusic(SoundName.mainBgm, 1, 1, true, false);
        }
Beispiel #5
0
 public override void Run()
 {
     UI.Open <LobbyBgUI>();
 }
Beispiel #6
0
 public override void Run()
 {
     UI.Open(typeof(LoginSceneUI_FairyGUI));
 }