예제 #1
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);
        }
    }
예제 #2
0
    public void OnBtnMainViewID(int ide)
    {    //ide
        if (UIWXLActivityMainController.Instance != null && UIWXLActivityMainController.Instance.active == true && ide != SQYMainController.CLICK_HuoDong)
        {
            UIWXLActivityMainController.Instance.OnBtnClick();
        }

        switch (ide)
        {
        case SQYMainController.CLICK_HaoYou:
            SetViewState(EMViewState.S_Friend);
            break;

        case SQYMainController.CLICK_BeiBao:
            SetViewState(EMViewState.S_Bag, EMBoxType.LOOK_Charator);
            HiddenFor3D_UI();
            break;

        case SQYMainController.CLICK_MONSTER:
            SetViewState(EMViewState.S_Team_NoSelect);
            HiddenFor3D_UI(false);
            break;

        case SQYMainController.CLICK_ShenLong:
        {
            if (Core.Data.playerManager.RTData.curLevel < 15)
            {
                string strText = Core.Data.stringManager.getString(6054);
                strText = strText.Replace("#", "15");
                SQYAlertViewMove.CreateAlertViewMove(strText);
                return;
            }
            SetViewState(EMViewState.S_ShenLong);
        }
        break;

        case SQYMainController.CLICK_RECHARGE:
            UIDragonMallMgr.GetInstance().SetRechargeMainPanelActive();
            break;

        case SQYMainController.CLICK_FuBen:
            SetViewState(EMViewState.S_FuBen);
            break;

        case SQYMainController.CLICK_DuoBao:
            if (Core.Data.playerManager.RTData.curLevel < 10)
            {
                string strText = Core.Data.stringManager.getString(6054);
                strText = strText.Replace("#", "10");
                SQYAlertViewMove.CreateAlertViewMove(strText);
                return;
            }
            SetViewState(EMViewState.S_QiangDuo);
            break;

        case SQYMainController.CLICK_ShangCheng:
            if (!Core.Data.BuildingManager.ZhaoMuUnlock)
            {
                string strText = Core.Data.stringManager.getString(9111);
                strText = string.Format(strText, RED.GetChineseNum(4));
                SQYAlertViewMove.CreateAlertViewMove(strText);
                return;
            }
            SetViewState(EMViewState.S_ShangCheng);
            break;

        case SQYMainController.CLICK_HuoDong:
            //   RED.Log("  in huo dong");
            SetViewState(EMViewState.S_HuoDong);
            break;

        case SQYMainController.CLICK_XiaoXi:
            SetViewState(EMViewState.S_XiaoXi);
            break;

        case SQYMainController.CLICK_QiTianJiangLi:
            GetGiftPanelController.CreateUIRewardPanel(_bottomRoot);
            //WXLAcitvityFactory.CreatActivity (ActivityItemType.DailyGiftPanel,_bottomRoot,null);
            //SetViewState(EMViewState.S_SevenDaysReward);
            break;

        case SQYMainController.CLICK_RollAct:
            RouletteLogic.CreateRouleView();
            break;

        case SQYMainController.CLICK_SuperGift:
            UIBigWheel.OpenUI();
            HiddenFor3D_UI();
            break;

        case SQYMainController.CLICK_HappyScratch:
            UIGuaGuaLeMain.OpenUI();
            HiddenFor3D_UI();
            break;

        case SQYMainController.CLICK_GodGift:
            WXLAcitvityFactory.CreatActivity(ActivityItemType.RollGamblePanel, _bottomRoot, null);
            break;

        case SQYMainController.CLICK_RadarGroup:
            ComLoading.Open();
            //           SetViewState (EMViewState.S_HuoDong);
            ActivityNetController.GetInstance().OutRadarLoginMSG(null, OnGoToRadarGroup);
            break;

        case SQYMainController.CLICK_FIRSTRECHARGE:

            DBUIController.mDBUIInstance.HiddenFor3D_UI(false);
            UIFirstRechargePanel.OpenUI();
            UIFirstRecharge.OpenUI();
            Core.Data.rechargeDataMgr._IsOpenFirstScene = true;
            break;

        case SQYMainController.CLICK_ACTIVITY:

            HolidayActivityLogic._instence();
            break;

        case SQYMainController.CLICK_DragonBank:
            WXLAcitvityFactory.CreatActivity(ActivityItemType.DragonBank, _bottomRoot, null);
            break;
        }
    }
예제 #3
0
    public void InitUI(int pos)
    {
        m_nPos = pos;
        MonsterTeam curTeam = Core.Data.playerManager.RTData.curTeam;

        if (IsLock(pos))
        {
            RED.SetActive(false, m_spProp.gameObject, m_txtLv.gameObject, m_EmptyEquip.gameObject);
            AtlasMgr.mInstance.SetHeadSprite(m_spHead, AtlasMgr.HEAD_LOCK);
            m_spHead.width  = 54;
            m_spHead.height = 61;

            string strTip = "";
            if (pos != 1)
            {
                strTip = Core.Data.stringManager.getString(5091);
                strTip = string.Format(strTip, Core.Data.playerManager.GetMonSlotUnLockLvl(pos + 1));
            }
            else
            {
                strTip = Core.Data.stringManager.getString(9111);
                strTip = string.Format(strTip, RED.GetChineseNum(4));
            }
            m_txtTip.text = strTip;
        }
        else
        {
            m_monster = curTeam.getMember(pos);
            if (m_monster != null)
            {
                RED.SetActive(true, m_spBg.gameObject, m_spProp.gameObject, m_txtLv.gameObject);
                AtlasMgr.mInstance.SetHeadSprite(m_spHead, m_monster.num.ToString());
                m_spBg.spriteName   = "star" + ((int)(m_monster.RTData.m_nAttr)).ToString();
                m_spProp.spriteName = "Attribute_" + ((int)(m_monster.RTData.Attribute)).ToString();
                m_txtLv.text        = "Lv" + m_monster.RTData.curLevel.ToString();



                if (voidPosEffect != null)
                {
                    RED.SetActive(false, voidPosEffect);
                }

                int count = 0;
                for (short i = 0; i < 2; i++)
                {
                    Equipment equip = Core.Data.playerManager.RTData.curTeam.getEquip(pos, i);
                    if (equip == null)
                    {
                        if (Core.Data.EquipManager.GetValidEquipCount(i, SplitType.Split_If_InCurTeam) > 0)
                        {
                            count++;
                        }
                    }
                }
                RED.SetActive(count > 0, m_EmptyEquip);
                m_spHead.MakePixelPerfect();
            }
            else
            {
                RED.SetActive(false, m_spBg.gameObject, m_spProp.gameObject, m_txtLv.gameObject);
                //AtlasMgr.mInstance.SetHeadSprite(m_spHead, AtlasMgr.HEAD_ADD);
                if (voidPosEffect != null)
                {
                    RED.SetActive(true, voidPosEffect);
                    int count = Core.Data.monManager.GetValidMonCount(SplitType.Split_If_InCurTeam);
                    RED.SetActive(count > 0, m_EmptyEquip.gameObject);
                }
                m_spHead.width  = 100;
                m_spHead.height = 100;
            }

            m_txtTip.text = "";
        }
    }
예제 #4
0
    void GoToShop()
    {
        if (!Core.Data.BuildingManager.ZhaoMuUnlock)
        {
            string strText = Core.Data.stringManager.getString(9111);
            strText = string.Format(strText, RED.GetChineseNum(4));
            SQYAlertViewMove.CreateAlertViewMove(strText);
//			string strText = Core.Data.stringManager.getString (7320);
//			strText = string.Format (strText, 5);
//			SQYAlertViewMove.CreateAlertViewMove (strText);
            return;
        }

        ShowFatePanelController.Instance.OnClose();
        if (ShowFatePanelController.Instance.cSkillPanel != null)
        {
            Destroy(ShowFatePanelController.Instance.cSkillPanel.gameObject);
        }

        if (ShowFatePanelController.Instance.curInPanelType == ShowFatePanelController.FateInPanelType.isInSkillInfoPanel)
        {
            if (TeamUI.mInstance != null && TeamUI.mInstance.IsShow)
            {
                TeamUI.mInstance.SetShow(false);
            }

            //   UIDragonMallMgr.GetInstance ().OpenUI (ShopItemType.Egg, ShopCallBack);
            ZhaoMuUI.OpenUI(ShowMonsterInfo);
            UIMiniPlayerController.Instance.SetActive(true);
        }
        else if (ShowFatePanelController.Instance.curInPanelType == ShowFatePanelController.FateInPanelType.isInMonsterInfoPanel)
        {
            if (MonsterInfoUI.mInstance != null)
            {
                MonsterInfoUI.mInstance.OnClickClose();
                if (SQYPetBoxController.mInstance != null)
                {
                    SQYPetBoxController.mInstance.viewWillHidden();
                }
            }

            // UIDragonMallMgr.GetInstance ().OpenUI (ShopItemType.Egg, ShowBagCallBack);
            ZhaoMuUI.OpenUI(ShowBagCallBack);
            UIMiniPlayerController.Instance.SetActive(true);
        }
        else if (ShowFatePanelController.Instance.curInPanelType == ShowFatePanelController.FateInPanelType.isInRecruitPanel)
        {
            ZhaoMuUI.mInstance.SetShow(false);
            if (MonsterInfoUI.mInstance != null)
            {
                MonsterInfoUI.mInstance.OnClickClose();
            }
            //   UIDragonMallMgr.GetInstance ().OpenUI (ShopItemType.Egg, RecruitCallBack);
            UIMiniPlayerController.Instance.SetActive(true);
        }
        else if (ShowFatePanelController.Instance.curInPanelType == ShowFatePanelController.FateInPanelType.isInBagPanel)
        {
            //	UIDragonMallMgr.GetInstance ().OpenUI (ShopItemType.Egg,ShowBagCallBack );
            ZhaoMuUI.OpenUI(ShowBagCallBack);
            UIMiniPlayerController.Instance.SetActive(true);
            SQYPetBoxController.mInstance.viewWillHidden();

            DBUIController.mDBUIInstance.HiddenFor3D_UI();
        }
        else if (ShowFatePanelController.Instance.curInPanelType == ShowFatePanelController.FateInPanelType.isInInfoPanel)
        {
            if (TeamUI.mInstance != null && TeamUI.mInstance.IsShow)
            {
                TeamUI.mInstance.SetShow(false);
            }
            ZhaoMuUI.OpenUI(ShowMonsterInfo);
            UIMiniPlayerController.Instance.SetActive(true);
        }
    }
예제 #5
0
    void OnEnable()
    {
        if(Instance == null)Instance = this;

        //初始化特殊副本是否解锁
        NewDungeonsManager newDM = Core.Data.newDungeonsManager;
        ExploreConfigData exploreConfig = newDM.GetExploreData (3);
        PVEType_Exp.isLock = (newDM.lastFloorId < exploreConfig.openfloor);

        string strText = Core.Data.stringManager.getString (9095);
        NewFloor floor = newDM.GetFloorData (exploreConfig.openfloor);
        if(floor != null)
        {
            int chapID = floor.BelongChapterID % 30000 / 100;
            string strLock = string.Format (strText, RED.GetChineseNum(chapID));
            PVEType_Exp.SetLockTxt (strLock);
        }

        exploreConfig = newDM.GetExploreData (1);
        PVEType_Skill.isLock = (newDM.lastFloorId < exploreConfig.openfloor);
        floor = newDM.GetFloorData (exploreConfig.openfloor);
        if(floor != null)
        {
            int chapID = floor.BelongChapterID % 30000 / 100;
            string strLock = string.Format (strText, RED.GetChineseNum(chapID));
            PVEType_Skill.SetLockTxt (strLock);
        }

        exploreConfig = newDM.GetExploreData (2);
        PVEType_FightSoul.isLock = (newDM.lastFloorId < exploreConfig.openfloor);
        floor = newDM.GetFloorData (exploreConfig.openfloor);
        if(floor != null)
        {
            int chapID = floor.BelongChapterID % 30000 / 100;
            string strLock = string.Format (strText, RED.GetChineseNum(chapID));
            PVEType_FightSoul.SetLockTxt (strLock);
        }

        JCPVETimerManager m = JCPVETimerManager.Instance;
        NewDungeonsManager dm = Core.Data.newDungeonsManager;
        int SkillCount = 0;
        int SkillPassCount = 2;
        int FightCount = 0;
        int FightPassCount = 2;
        if(dm.explorDoors!= null)
        {
            //技能副本
            if(dm.explorDoors.skill != null)
            {
                SkillPassCount = dm.explorDoors.skill.passCount;
                SkillCount = dm.explorDoors.skill.count;
                if(SkillPassCount < SkillCount)
                {
                     m.SkillFBCoding = SkillFBCoding;
                     SkillFBCoding(Core.Data.temper.SkillDJS);
                    if(!JCPVETimerManager.Instance.isSkillFBCoding)
                        PVEType_Skill.SetProgress(SkillPassCount,SkillCount,dm.explorDoors.skill.needStone);
                }
               else
                    PVEType_Skill.SetProgress(SkillPassCount,SkillCount,dm.explorDoors.skill.needStone);

            }
            //战魂副本
            if(dm.explorDoors.souls != null)
            {
                FightCount = dm.explorDoors.souls.count;
                FightPassCount = dm.explorDoors.souls.passCount;
                if(FightPassCount < FightCount)
                {
                     m.FightSoulFBCoding = FightSoulFBCoding;
                     FightSoulFBCoding(Core.Data.temper.FightSoulDJS);
                    if(!JCPVETimerManager.Instance.isFightSoulFBCoding)
                        PVEType_FightSoul.SetProgress(FightPassCount,FightCount,dm.explorDoors.souls.needStone);
                }
               else
                    PVEType_FightSoul.SetProgress(FightPassCount,FightCount,dm.explorDoors.souls.needStone);

            }
            int ExpAndGemCount = 0;
            if(dm.explorDoors.exp != null)
                ExpAndGemCount+=dm.explorDoors.exp.count;
            if(dm.explorDoors.gems != null)
                ExpAndGemCount+=dm.explorDoors.gems.count;

            int ExpAndGemPassCount = 0;
            if(dm.explorDoors.exp != null)
                ExpAndGemPassCount+=dm.explorDoors.exp.passCount;
            if(dm.explorDoors.gems != null)
                ExpAndGemPassCount+=dm.explorDoors.gems.passCount;

            PVEType_Exp.SetProgress2(ExpAndGemPassCount.ToString()+"/"+ExpAndGemCount.ToString());
        }
    }