Ejemplo n.º 1
0
    void ButtonClick(GameObject button)
    {
        switch (button.name)
        {
        case "Btn_Gem_120101":
        case "Btn_Gem_120102":
        case "Btn_Gem_120201":
        case "Btn_Gem_120202":
        case "Btn_Gem_120301":
        case "Btn_Gem_120302":
        {
            int DuiHuanNum = System.Convert.ToInt32(button.name.Substring(8, 6));
            SendDuiHuanMsg(DuiHuanNum);
        }
        break;

        case "Btn_LGem":
        case "Btn_RGem":
            FillGemBtn(button);
            break;

        case "Btn_Describe":
            Debug.Log("Btn_Describe");
            DescribeMessageBox.Open(TEXT(5055) + TEXT(9004), TEXT(9015));
            break;

        case "Btn_Synthetic":
            /*宝石合成
             */
            //	SendHeChengMsg();
            ReCombineGem();
            break;

        case "+":
            PlusModelNum();
            break;

        case "-":
            ReduceModelNum();
            break;

//            case "-Num":
//                if(defaultNum >1)
//                    ReduceBtn();
//                break;
//            case "+Num":
//                PlusBtn();
//                break;
        case "DespBtn":
            view.ShowDesp();
            break;

        case "CloseDespBtn":
            view.CloseDesp();
            break;

        case "Btn_Synthetic_Baodi":
            //     SendHeChengMsg(true);
            break;
        }
    }
Ejemplo n.º 2
0
    void OnClick()
    {
        if (_game == null)
        {
            if (_gameVisible != null)
            {
                UIInformation.GetInstance().OnCancel();
                _gameVisible.SetActive(false);
            }
            return;
        }


        if (_game.GetComponent <MonsterInfoUI> () != null)
        {
            MonsterInfoUI MonsterInfoUI = _game.GetComponent <MonsterInfoUI> ();
            MonsterInfoUI.OnClickClose();
        }
        else if (_game.GetComponent <GetRewardSucUI> () != null)
        {
            //
            GetRewardSucUI RewardSucUI = _game.GetComponent <GetRewardSucUI> ();
            RewardSucUI.OnBtnOK();
        }
        else if (_game.GetComponent <SelUserHeadUI> () != null)
        {
            SelUserHeadUI SelUserHead = _game.GetComponent <SelUserHeadUI> ();
            SelUserHead.OnClickExit();
        }
        else if (_game.GetComponent <UIMessageMail> () != null)
        {
            UIMessageMail MessageMail = _game.GetComponent <UIMessageMail> ();
            MessageMail.OnBtnClick("Close");
        }
        else if (_game.GetComponent <JCEquipmentDesInfoUI> () != null)            // 装备查看
        {
            JCEquipmentDesInfoUI JCEquipmentDesInfo = _game.GetComponent <JCEquipmentDesInfoUI> ();
            JCEquipmentDesInfo.OnXBtnClick();
        }
        else if (_game.GetComponent <WXLActivityFestivalController> () != null)            // 武者节日说明界面
        {
            WXLActivityFestivalController WXLActivityFestival = _game.GetComponent <WXLActivityFestivalController> ();
            WXLActivityFestival.On_BtnClose();
            //WXLActivityFestivalController
        }
        else if (_game.GetComponent <TrucePanelScript> () != null)           // 神龙购买免战牌

        {
            TrucePanelScript TrucePanel = _game.GetComponent <TrucePanelScript> ();
            TrucePanel.OnXBtnClick();
            //TrucePanelScript
        }
        else if (_game.GetComponent <UIAnnounce> () != null)            // 公告
        {
            UIAnnounce uia = _game.GetComponent <UIAnnounce> ();
            uia.Back_OnClick();
        }
        else if (_game.GetComponent <UIDateSignController> () != null)            // 签到
        {
            UIDateSignController uds = _game.GetComponent <UIDateSignController> ();
            uds.OnBackBtn();
        }
        else if (_game.GetComponent <GemSyntheticSystemUI_View> () != null)            // 宝石合成功能说明
        {
            GemSyntheticSystemUI_View gss = _game.GetComponent <GemSyntheticSystemUI_View> ();
            gss.CloseDesp();
        }
        else if (_game.GetComponent <LevelUpUI> () != null)
        {
            LevelUpUI lp = _game.GetComponent <LevelUpUI> ();
            lp.OnBtnOK();
        }
        else if (_game.GetComponent <UIGambleController> () != null)
        {
            UIGambleController uc = _game.GetComponent <UIGambleController> ();
            uc.OnClose();
        }
        else if (_game.GetComponent <UITask> () != null)
        {
            UITask uiT = _game.GetComponent <UITask> ();
            uiT.UIDestory();
        }
        else if (_game != null) //直接干掉界面不需要调什么东西
        {
            ComLoading.Close(); // 关闭界面关闭Comloading.Close();
            UIInformation.GetInstance().OnCancel();
            Destroy(_game);
        }
        else if (_gameVisible != null) //直接隐藏界面
        {
            UIInformation.GetInstance().OnCancel();
            _gameVisible.SetActive(false);
        }
    }