Example #1
0
        // Update is called once per frame
        void Update()
        {
            if (Input.GetKeyDown(KeyCode.A))
            {
                BubbleFrameEntry.GetModel <UI_Manager>().Show(UI_Name.UI_TEST_01, new Test_01Content("这是显示的第一个UI"));
            }
            if (Input.GetKeyDown(KeyCode.B))
            {
                BubbleFrameEntry.GetModel <UI_Manager>().Hide(UI_Name.UI_TEST_01);
            }
            if (Input.GetKeyDown(KeyCode.C))
            {
                BubbleFrameEntry.GetModel <UI_Manager>().Show(UI_Name.UI_TEST_02, new Test_02Content("这是显示的第一个UI"));
            }
            if (Input.GetKeyDown(KeyCode.D))
            {
                BubbleFrameEntry.GetModel <UI_Manager>().Hide(UI_Name.UI_TEST_02);
            }

            if (Input.GetKeyDown(KeyCode.E))
            {
                BubbleFrameEntry.GetModel <UI_Manager>().HideView(UIType.Normal);
            }

            if (Input.GetKeyDown(KeyCode.F))
            {
                BubbleFrameEntry.GetModel <AppEventDispatcher>().BroadcastListener(EventName.EVENT_TEST01, "广播第一次");
            }
        }
Example #2
0
 private void OnDestroy()
 {
     BubbleFrameEntry.GetModel <AppEventDispatcher>().RemoveEventListener <EventType>(EventName.EVENT_TEST01, OnChangeDes);
 }
Example #3
0
 public override void Init()
 {
     base.Init();
     UiType = UIType.Normal;
     BubbleFrameEntry.GetModel <AppEventDispatcher>().AddEventListener <EventType>(EventName.EVENT_TEST01, OnChangeDes);
 }
 public override void RefreshLanguage()
 {
     _des.text = BubbleFrameEntry.GetModel <LanguageMgr>().GetText(0);
 }
Example #5
0
 private void OnDisable()
 {
     BubbleFrameEntry.GetModel <AppEventDispatcher>().RemoveEventListener <EventType>(EventName.EVENT_CHANGECROSSCOUNT, OnChangeCrossCount);
     BubbleFrameEntry.GetModel <AppEventDispatcher>().RemoveEventListener <EventType>(EventName.EVENT_COUNTDOWN, OnCountDown);
 }