Exemple #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>();
            });
        }
        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>();
            });
        }