Esempio n. 1
0
        protected override void RegisterUIEvent()
        {
            BtnClose.OnClickAsObservable().Subscribe(_ =>
            {
                CloseSelf();
            });

            BtnGemAdd.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <UIShopGemPanel>();
            });

            BtnGoldAdd.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <UIShopGoldPanel>();
            });
        }
Esempio n. 2
0
        private void Awake()
        {
            ShowValueChaged();

            BtnClose.OnClickAsObservable().Subscribe(_ =>
            {
                // 关闭父节点的panel
                UIMgr.ClosePanel(transform.parent.name);
            });

            BtnGemAdd.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <UIShopGemPanel>();
            });

            BtnGoldAdd.OnClickAsObservable().Subscribe(_ =>
            {
                UIMgr.OpenPanel <UIShopGoldPanel>();
            });
        }
Esempio n. 3
0
 protected override void RegisterUIEvent()
 {
     BtnBack.OnClickAsObservable().Subscribe(_ =>
     {
         CloseSelf();
     });
     StageCompleteStar3.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIMapStatesDesPanel>();
     });
     StageLock.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIMapStagesLockPanel>();
     });
     BtnGoldAdd.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIShopGoldPanel>();
     });
     BtnGemAdd.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIShopGemPanel>();
     });
 }
Esempio n. 4
0
 protected override void RegisterUIEvent()
 {
     // 英雄按钮点击
     MenuHeros.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuHeros!");
         UIMgr.OpenPanel <UIMyInfoPanel>();
     });
     // 队伍按钮点击
     MenuTeam.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuTeam!");
         UIMgr.OpenPanel <UIMyInfoPanel>();
     });
     // 背包按钮点击
     MenuBackpack.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuBackpack!");
         UIMgr.OpenPanel <UIInventoryNewPanel>();
     });
     // 酒馆按钮点击
     MenuPub.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIHeroPubPanel>();
     });
     // 道具按钮点击
     MenuProps.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuProps!");
         UIMgr.OpenPanel <UIPropPanel>();
     });
     // 任务按钮点击
     MenuMission.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked Mission!");
         UIMgr.OpenPanel <UIMissionPanel>();
     });
     // 商店按钮点击
     MenuShop.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuShop!");
         UIMgr.OpenPanel <UIShopGoldPanel>();
     });
     // 设置按钮点击
     MenuSetting.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuSetting!");
         UIMgr.OpenPanel <UISettingPanel>();
     });
     // 消息按钮点击
     MenuMessages.OnClickAsObservable().Subscribe(_ =>
     {
         Debug.Log("Clicked MenuMessages!");
         UIMgr.OpenPanel <UIMessagePanel>();
     });
     // 增加钻石按钮点击
     BtnGemAdd.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIShopGemPanel>();
     });
     // 增加金币按钮
     BtnGoldAdd.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIShopGoldPanel>();
     });
     // 用户信息按钮点击
     BtnUserInfo.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIMyInfoPanel>();
     });
     // 战斗按钮点击
     BtnPlay.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIMapPanel>();
     });
     // 福利按钮点击
     MenuFree.OnClickAsObservable().Subscribe(_ =>
     {
         UIMgr.OpenPanel <UIFreeRewardPanel>();
     });
 }