示例#1
0
        public void SetSelectDungeon(int dungeonID)
        {
            DungeonType dungeonType = DungeonData.GetDungeonDataByID(dungeonID).dungeonType;

            if (_currentSelectDungeonType != dungeonType)
            {
                ResetDifficulty(dungeonType);
            }
            DungeonButton dungeonButton = null;

            if (_easyDungeonButtonDic.ContainsKey(dungeonID))
            {
                _easyDungeonButtonDic.TryGetValue(dungeonID, out dungeonButton);
            }
            else if (_normalDungeonButtonDic.ContainsKey(dungeonID))
            {
                _normalDungeonButtonDic.TryGetValue(dungeonID, out dungeonButton);
            }
            else if (_hardDungeonButtonDic.ContainsKey(dungeonID))
            {
                _hardDungeonButtonDic.TryGetValue(dungeonID, out dungeonButton);
            }

            ChapterData chapterData = ChapterData.GetChapterDataContainsDungeon(dungeonID);

            MoveTo(chapterData);
        }
示例#2
0
        public DungeonData GetDungeonDataOfLevel(int level)
        {
            DungeonData dungeonData = null;
            int         dungeonID   = GetDungeonIDOfLevel(level);

            dungeonData = DungeonData.GetDungeonDataByID(dungeonID);
            return(dungeonData);
        }
示例#3
0
        private DungeonInfo GetNextDungeon()
        {
            DungeonData currentDungeonData = Logic.Fight.Model.FightProxy.instance.CurrentDungeonData;
            DungeonData nextDungeonData    = DungeonData.GetDungeonDataByID(currentDungeonData.unlockDungeonIDNext1);


            DungeonInfo nextDungeonInfo = Dungeon.Model.DungeonProxy.instance.GetDungeonInfo(nextDungeonData.dungeonID);

            return(nextDungeonInfo);
        }
        private void ResetLevel(int level)
        {
            int         dungeonID   = _activityInfo.ActivityData.GetDungeonIDOfLevel(level);
            DungeonData dungeonData = DungeonData.GetDungeonDataByID(dungeonID);

            if (GameProxy.instance.AccountLevel < dungeonData.unlockLevel)
            {
                string accountLevelNotEnoughTipsString = string.Format(Localization.Get("ui.daily_dungeon_info_view.account_level_not_enough"), dungeonData.unlockLevel);
                CommonAutoDestroyTipsView.Open(accountLevelNotEnoughTipsString);
                return;
            }

            _currentSelectLevel       = level;
            currentLevelNameText.text = string.Format(Localization.Get("ui.daily_dungeon_info_view.dungeon_difficulty_title"), level + 1);
            ResetEnemies(dungeonData);
            ResetLoot(dungeonData);
            ResetCost();
            RefreshPreviousLevelAndNextLevelButtons();
        }
示例#5
0
        public void QuitPveCallback()
        {
            DungeonData currentDungeonData      = FightProxy.instance.CurrentDungeonData;
            DungeonType lastSelectedDungeonType = Logic.Chapter.Model.ChapterProxy.instance.LastSelectedDungeonType;

            if (lastSelectedDungeonType == DungeonType.Invalid)
            {
                lastSelectedDungeonType = DungeonType.Easy;
            }
            int         lastSelectedDungeonDataID = Logic.Dungeon.Model.DungeonProxy.instance.GetLastUnlockDungeonID(lastSelectedDungeonType);
            DungeonData lastSelectDungeonData     = DungeonData.GetDungeonDataByID(lastSelectedDungeonDataID);

            switch (quitResultType)
            {
            case FightResultQuitType.Fight_Again:
                Logic.UI.DungeonDetail.Model.DungeonDetailProxy.instance.StartFight();
                break;

            case FightResultQuitType.Fight_Again_Map:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_Detail_View, currentDungeonData.dungeonID, true);
                break;

            case FightResultQuitType.Fight_Next_Dungeon:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_Detail_View, GetNextDungeon().dungeonData.dungeonID, true);
                break;

            case FightResultQuitType.Go_Equip:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Equipment_View);
                break;

            case FightResultQuitType.Go_Hero:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.RoleInfoView);
                break;

            case FightResultQuitType.Go_Map:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, currentDungeonData.dungeonID, true);
                break;

            case FightResultQuitType.Go_Player:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.PlayerInfoView);
                break;

            case FightResultQuitType.Go_Formation:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.PveEmbattleView);
                break;

            case FightResultQuitType.Go_Shop:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Shop_View);
                break;

            case FightResultQuitType.Go_MainView:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.MainView);
                break;

            case FightResultQuitType.GO_Boss_List:
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Dungeon_SelectChapter_View, lastSelectDungeonData.dungeonID, true);
                FunctionOpenProxy.instance.OpenFunction(FunctionOpenType.Boss_List_View);
                break;
            }
        }