Example #1
0
 void OnBtnOK()
 {
     DBUIController.mDBUIInstance.HiddenFor3D_UI(true);
     MailBox.OpenUI(0, MailBoxShowTab.BattleMsg);
     OnBtnCancel();
 }
Example #2
0
    public void ClickBuild()
    {
        if (Core.Data.playerManager.RTData.curLevel < m_buildData.config.limitLevel && m_buildData.config.limitLevel >= 0)
        {
            string strText = Core.Data.stringManager.getString(6054);
            strText = strText.Replace("#", m_buildData.config.limitLevel.ToString());
            SQYAlertViewMove.CreateAlertViewMove(strText);
            return;
        }

        if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_PRODUCE)
        {
            if (m_buildData.RTData.openType != 0 && m_buildData.RTData.robc > 0 && !m_bRobTipOpened)
            {
                ShowRobUI();
                return;
            }
        }

        if (m_buildData.config.id == BaseBuildingData.BUILD_ZHAOMU)
        {
            if (Core.Data.BuildingManager.ZhaoMuUnlock)
            {
                ZhaoMuUI.OpenUI();
                DBUIController.mDBUIInstance.HiddenFor3D_UI();
            }
            else
            {
                string strText = Core.Data.stringManager.getString(9111);
                strText = string.Format(strText, RED.GetChineseNum(4));
                SQYAlertViewMove.CreateAlertViewMove(strText);
            }
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_XUNLIAN)
        {
            TrainingRoomUI.OpenUI();
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_YELIAN)
        {
            FrogingSystem.ForgingRoomUI.OpenUI();
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_TREE)
        {
            string strText = Core.Data.stringManager.getString(5116);
            SQYAlertViewMove.CreateAlertViewMove(strText);
            return;
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_SHOP)
        {
            SecretShopMgr.GetInstance().SetSecretShop(true, 1);
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        else if (m_buildData.config.id == BaseBuildingData.Q_phD)
        {
            SecretShopMgr.GetInstance().SetSecretShop(true, 2);
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_MailBox)
        {
            MailBox.OpenUI(1);
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_FUBEN)
        {
            DBUIController.mDBUIInstance.OnBtnMainViewID(SQYMainController.CLICK_FuBen);
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_CHALLENGE)
        {
            DBUIController.mDBUIInstance.OnBtnMainViewID(SQYMainController.CLICK_DuoBao);
        }
        else if (m_buildData.config.id == BaseBuildingData.BUILD_FRAGMENT)
        {
            DBUIController.mDBUIInstance.SetViewState(RUIType.EMViewState.S_Bag, RUIType.EMBoxType.LOOK_MonFrag);
        }
        else if (m_buildData.config.build_kind == BaseBuildingData.BUILD_KIND_PRODUCE)
        {
            Debug.Log("  build_kind  " + m_buildData.config.build_kind);
            UISourceBuilding.OpenUI(m_buildData);
        }
        else
        {
            BuildingLvUpNew.OpenUI(m_buildData);
            //BuildLvlUpUI.OpenUI(m_buildData);
        }
    }
Example #3
0
    void CheckJump()
    {
        switch (BattleToUIInfo.From)
        {
        case EMViewState.NONE:
            break;

        case EMViewState.MainView:
            break;

        case EMViewState.S_QiangDuo:
        {
            SetViewState(EMViewState.S_QiangDuo);
//				   FinalTrialDougoenType _type = FinalTrialMgr.GetInstance ().NowDougoenType;
            FinalTrialMgr.GetInstance().SetShaluBuouStatus(Core.Data.temper.warBattle.battleData.iswin);

            if (FinalTrialMgr.GetInstance().NowEnum == TrialEnum.TrialType_ShaLuChoose)
            {
                FinalTrialMgr.GetInstance().OpenNewMap(1);
                mDuoBaoView.SetActive(false);
            }
            else if (FinalTrialMgr.GetInstance().NowEnum == TrialEnum.TrialType_PuWuChoose)
            {
                FinalTrialMgr.GetInstance().OpenNewMap(2);
                mDuoBaoView.SetActive(false);
            }
        }
        break;

        case EMViewState.S_HuoDong:
        {
            SetViewState(EMViewState.S_HuoDong);
        }
        break;

        case EMViewState.S_MosterCome:

            SetViewState(EMViewState.S_MosterCome);
            break;

        case EMViewState.S_QiangDuoDragonBall:
        {
            SetViewState(EMViewState.S_QiangDuo);
            SetViewState(EMViewState.S_ShenLong);
        }
        break;

        case EMViewState.S_Friend:
        {
            SetViewState(EMViewState.S_Friend);
        }
        break;

        case EMViewState.S_Team_NoSelect:
        {
            SetViewState(EMViewState.S_Team_NoSelect);
            HiddenFor3D_UI(false);
        }
        break;

        case EMViewState.S_Bag:
        {
            SetViewState(EMViewState.S_Bag, EMBoxType.LOOK_Charator);
            HiddenFor3D_UI();
        }
        break;

        case EMViewState.S_ShangCheng:
        {
            SetViewState(EMViewState.S_ShangCheng);
        }
        break;

        case EMViewState.S_MailBox:
        {
            MailBox.OpenUI(1);
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        break;

        case EMViewState.S_XiaoXi:
            MessageMgr.GetInstance().SetInfoPanel(true);
            break;

        case EMViewState.S_GPSWar:
            HiddenFor3D_UI();
            RadarTeamUI.OpenUI();
            break;

        default:     //EMViewState.S_CityFloor

            WhichChange c = Core.Data.dungeonsManager.getChanged;
            if (c.ChapterChanged)
            {
                SetViewState(EMViewState.S_FuBen);
            }
            else
            {
                SetViewState(EMViewState.S_CityFloor, EMBoxType.NONE, CityFloorData.Instance.chapter);
            }
            if (GameObject.Find("pbUICityFloorManager(Clone)") != null)
            {
                DBUIController.mDBUIInstance.HiddenFor3D_UI();
            }
            // add by wxl
            PreDownload();

            if (Core.Data.temper != null && Core.Data.playerManager.Lv <= Core.Data.temper.mPreLevel && Core.Data.temper.mPreLevel > 0)
            {
                Core.Data.deblockingBuildMgr.OpenLevelUpUnlock(false);
            }
            break;
        }


        //自动处理升级弹窗
        AutoDealLevelUpUI();

        BattleToUIInfo.From = EMViewState.NONE;
    }