public int GetTheLastInstaceID(InstanceType instanceType) { List <ChapterInfo> dataByInstanceType = this.GetDataByInstanceType((int)instanceType); bool flag = false; int result = 0; for (int i = 0; i < dataByInstanceType.get_Count(); i++) { ChapterInfo chapterInfo = dataByInstanceType.get_Item(i); for (int j = 0; j < chapterInfo.dungeons.get_Count(); j++) { DungeonInfo dungeonInfo = chapterInfo.dungeons.get_Item(j); if (!dungeonInfo.clearance) { result = dungeonInfo.dungeonId; flag = true; break; } } if (flag) { break; } } if (!flag) { ChapterInfo chapterInfo2 = dataByInstanceType.get_Item(dataByInstanceType.get_Count() - 1); DungeonInfo dungeonInfo2 = chapterInfo2.dungeons.get_Item(chapterInfo2.dungeons.get_Count() - 1); result = dungeonInfo2.dungeonId; } return(result); }
private bool CheckChallangeTimes() { DungeonInfo dungeonInfo = DungeonManager.Instance.GetDungeonInfo(this.currentMopupInstance); if (dungeonInfo == null) { return(false); } if (dungeonInfo.remainingChallengeTimes < this.mopupTimes || dungeonInfo.remainingChallengeTimes == 0) { if (dungeonInfo.resetChallengeTimes >= VIPPrivilegeManager.Instance.GetVipTimesByType(4)) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(505118, false), 1f, 1f); } DungeonManager.Instance.BuyChallengeTimes(this.currentMopupInstance, delegate { if (this.isMutliMopup) { this.mopupTimes = DungeonManager.Instance.GetDungeonInfo(this.currentMopupInstance).remainingChallengeTimes; if (this.mopupTimes > 10) { this.mopupTimes = 10; } } else { this.mopupTimes = 1; } this.GoOnMopUp(); }); return(false); } return(true); }
private IEnumerator ResultsAnim() { if (SceneUtil.IsCurrentLevelIndex) { LevelParams level = SceneUtil.GetParams(SceneUtil.LevelIndex); if (level.HasTrophy) { GameJolt.API.Trophies.Unlock(level.TrophyID); } } foreach (TutorialBoard tb in FindObjectsOfType<TutorialBoard>()) { Destroy(tb.gameObject); } DungeonInfo info = DungeonInfo.Instance; success.text = string.Format("<color=yellow>{0}</color>\ncleared", info.LevelName); success.gameObject.SetActive(true); yield return Util.Lerp(successFadeInDuration, t => success.color = Color.Lerp(Color.clear, Color.white, t)); window.gameObject.SetActive(true); yield return Util.Lerp(windowTransitionDuration, t => window.transform.localScale = Vector2.Lerp(Vector2.up, Vector2.one, t)); exit.gameObject.SetActive(true); yield return WaitThenDisplay(1f, results.gameObject); foreach (GameObject display in stats) { yield return WaitThenDisplay(0.25f, display); } yield return Util.AnimateScore(time, 0, (int)Time.timeSinceLevelLoad, 0.25f, scoreSound); int stepCount = Player.Instance.Stats.StepCount; yield return Util.AnimateScore(steps, 0, stepCount, 0.25f, scoreSound); isDoneShowingResults = true; // Ranking and leaderboard yield return AnimateRank(stepCount); }
private void Init(Upload upload, string stage, int sceneOnVictory, int sceneOnExit) { DontDestroyOnLoad(this.gameObject); DungeonManager dungeon = DungeonManager.Instance; DungeonInfo info = DungeonInfo.Instance; SerializationUtil.DeserializeDungeonToPlayable( upload, stage, sceneOnVictory, sceneOnExit, info, dungeon.gameObject, floorPrefab, wallPrefab, upstairsPrefab, downstairsPrefab, goldKeyPrefab, blueKeyPrefab, redKeyPrefab, playerPrefab, exitPrefab, goldDoorPrefab, blueDoorPrefab, redDoorPrefab, enemyPrefab, boosterPrefab); Debug.Log("deserialized"); }
public void BuyChallengeTimes(int instanceID, Action buyChallengeTimesSuccessCallBack) { this.m_buyChallengeTimesSuccessCallBack = buyChallengeTimesSuccessCallBack; DungeonInfo di = DungeonManager.Instance.GetDungeonInfo(instanceID); if (di == null) { return; } ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(instanceID); if (di.resetChallengeTimes >= VIPPrivilegeManager.Instance.GetVipTimesByType(4)) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(505118, false), 1f, 1f); return; } LeiXingXiaoHaoBiao leiXingXiaoHaoBiao = DataReader <LeiXingXiaoHaoBiao> .DataList.Find((LeiXingXiaoHaoBiao a) => a.ID == 1 && a.resetTime == di.resetChallengeTimes + 1); int needGoodNum = leiXingXiaoHaoBiao.needGoodNum; string text = GameDataUtils.GetChineseContent(505071, false); text = text.Replace("x{0}", needGoodNum.ToString()); text = text.Replace("x{1}", zhuXianPeiZhi.num.ToString()); text = text.Replace("x{2}", (VIPPrivilegeManager.Instance.GetVipTimesByType(4) - di.resetChallengeTimes).ToString()); text = text.Replace("x{3}", VIPPrivilegeManager.Instance.GetVipTimesByType(4).ToString()); DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(500032, false), text, delegate { }, delegate { DungeonManager.Instance.SendResetChallengeTimesReq(instanceID); }, GameDataUtils.GetChineseContent(505113, false), GameDataUtils.GetChineseContent(505114, false), "button_orange_1", "button_yellow_1", null, true, true); }
public void Load(byte[] bytes) { DungeonInfoMap = new SortedDictionary <DungeonInfoKey, DungeonInfo>(); BinaryHelper helper = new BinaryHelper(bytes); int dungeonCount = helper.ReadInt(); for (int index = 0; index < dungeonCount; ++index) { DungeonInfo dungeonInfo = new DungeonInfo(); dungeonInfo.DungeonId = helper.ReadInt(); dungeonInfo.DungeonGrade = helper.ReadInt(); dungeonInfo.DungeonName = helper.ReadString(); int sceneCount = helper.ReadInt(); dungeonInfo.SceneIdList = new List <int>(sceneCount); for (int sceneIndex = 0; sceneIndex < sceneCount; sceneIndex++) { dungeonInfo.SceneIdList.Add(helper.ReadInt()); } dungeonInfo.LevelMin = helper.ReadInt(); dungeonInfo.LevelMax = helper.ReadInt(); dungeonInfo.QuestId = helper.ReadInt(); dungeonInfo.NeedEnergy = helper.ReadInt(); dungeonInfo.TeamVolume = helper.ReadInt(); DungeonInfoKey newKey = new DungeonInfoKey(); newKey.DungeonID = dungeonInfo.DungeonId; newKey.DungeonGrade = dungeonInfo.DungeonGrade; DungeonInfoMap.Add(newKey, dungeonInfo); } }
/// <summary> /// Generate the specified dungeonWidth and dungeonHeight. /// Main function. /// </summary> /// <param name="dungeonWidth">Dungeon width.</param> /// <param name="dungeonHeight">Dungeon height.</param> public void Generate(int dungeonWidth, int dungeonHeight) { // create parent GO. if (worldParent == null) { worldParent = new GameObject("Dungeon"); DungeonInfo info = worldParent.AddComponent <DungeonInfo>(); info.SetHeight(dungeonHeight); info.SetWidth(dungeonWidth); } // We can use different kinds of maze builder scripts here. //DefaultMaze.Generate(dungeonHeight, dungeonWidth); //SimpleMazeBuilder.Generate(dungeonHeight, dungeonWidth); //RoomMaze.Generate(dungeonWidth,dungeonHeight); CorridorToRoom.Generate(dungeonHeight, dungeonWidth); // Modify existing tiles. GenerateExit(); GenerateTraps(); CalculateWallTileSprites(); // generate doors only after calculating // the wall sprites! //GenerateDoors(); // Create items. DungeonItemManager.instance.SpawnItems(); DungeonVanityManager.instance.SpawnVanityItems(); }
public override void OnCreate() { base.OnCreate(); var tbFuben = Table.GetFuben(TableSceneData.FubenId); #if DEBUG if (null == tbFuben) { Debug.Assert(false); } if (ParamIdx_Max != tbFuben.lParam1.Count) { Debug.Assert(false); } #endif TableParam = tbFuben.lParam1; Msg = new DungeonInfo(); Msg.Type = 0; mTrigger = SceneServerControl.Timer.CreateTrigger(DateTime.Now, LogicTick, AddExpSecondInterval); if (tbFuben.OpenTime.Count >= 1) { var startTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, tbFuben.OpenTime[0] / 100, tbFuben.OpenTime[0] % 100, 0); var endTime = startTime.AddMinutes(tbFuben.CanEnterTime); StartTimer(eDungeonTimerType.WaitEnd, endTime, FubenTimeOver); } }
public static DungeonDetailView Open(DungeonInfo info) { DungeonDetailView view = UIMgr.instance.Open <DungeonDetailView>(PREFAB_PATH, EUISortingLayer.MainUI, UIOpenMode.Overlay); view.SetDungeonInfo(info); return(view); }
public static void SaveDungeonData(DungeonInfo data) { Directory.CreateDirectory(FileNames.DungeonDirectory); string jsonData = JsonConvert.SerializeObject(data); File.WriteAllText(FileNames.DungeonSaveFile, jsonData); }
public static void HandleDungeonTile(Session session, ClientDungeonTiles packet) { foreach (uint cellId in packet.CellIds) { DungeonInfo dungeonInfo = DungeonTileManager.GetDungeonInfo((short)cellId); if (dungeonInfo == null) { continue; } var dungeonTiles = new ServerDungeonTiles(); foreach (DungeonTileInfo dungeonTileInfo in dungeonInfo) { dungeonTiles.Tiles.Add(new ServerDungeonTiles.Tile { X = dungeonTileInfo.Origin.X, Y = dungeonTileInfo.Origin.Y, Z = dungeonTileInfo.Origin.Z, TileId = dungeonTileInfo.TileId, LandBlockId = dungeonTileInfo.LandBlockId, ushort_2 = 0, byte_0 = 1 }); } session.EnqueueMessage(dungeonTiles); } }
private IEnumerator ResultsAnim() { foreach (TutorialBoard tb in FindObjectsOfType <TutorialBoard>()) { Destroy(tb.gameObject); } DungeonInfo info = DungeonInfo.Instance; success.text = string.Format("<color=yellow>{0}</color>\nwas cleared!", info.LevelName); success.gameObject.SetActive(true); yield return(Util.Lerp(successFadeInDuration, t => success.color = Color.Lerp(Color.clear, Color.white, t))); window.gameObject.SetActive(true); yield return(Util.Lerp(windowTransitionDuration, t => window.transform.localScale = Vector2.Lerp(Vector2.up, Vector2.one, t))); exit.gameObject.SetActive(true); yield return(WaitThenDisplay(1f, results.gameObject)); foreach (GameObject display in stats) { yield return(WaitThenDisplay(0.25f, display)); } yield return(Util.AnimateScore(time, 0, (int)Time.timeSinceLevelLoad, 0.25f, scoreSound)); int stepCount = Player.Instance.Stats.StepCount; yield return(Util.AnimateScore(steps, 0, stepCount, 0.25f, scoreSound)); // Ranking and leaderboard yield return(AnimateRank(stepCount)); }
public int GetChapterIdByDungeonInfo(DungeonInfo dungeonInfo) { if (dungeonInfo == null) { return(0); } List <ChapterInfo> chapterList = ChapterProxy.instance.GetAllChapterInfos(); ChapterInfo cinfo; int[] dungeonIds; for (int i = 0, count = chapterList.Count; i < count; i++) { cinfo = chapterList[i]; dungeonIds = cinfo.chapterData.GetChapterDungeonIDListOfDungeonType(dungeonInfo.dungeonData.dungeonType).ToArray(); for (int j = 0, count2 = dungeonIds.Length; j < count2; j++) { if (dungeonInfo.id == dungeonIds[j]) { return(cinfo.chapterId); } } } return(0); }
public static void UpdateDungeonRunDeck(DungeonInfo info) { if (!Config.Instance.DungeonAutoImport) { return; } Log.Info("Found dungeon run deck!"); var allCards = info.DbfIds.ToList(); if (info.PlayerChosenLoot > 0) { var loot = new[] { info.LootA, info.LootB, info.LootC }; var chosen = loot[info.PlayerChosenLoot - 1]; for (var i = 1; i < chosen.Count; i++) { allCards.Add(chosen[i]); } } if (info.PlayerChosenTreasure > 0) { allCards.Add(info.Treasure[info.PlayerChosenTreasure - 1]); } var cards = allCards.GroupBy(x => x).Select(x => { var card = Database.GetCardFromDbfId(x.Key, false); card.Count = x.Count(); return(card); }).ToList(); if (!Config.Instance.DungeonRunIncludePassiveCards) { cards.RemoveAll(c => !c.Collectible && c.HideStats); } var playerClass = ((CardClass)info.HeroCardClass).ToString().ToUpperInvariant(); var deck = DeckList.Instance.Decks.FirstOrDefault(x => x.IsDungeonDeck && x.Class.ToUpperInvariant() == playerClass && !(x.IsDungeonRunCompleted ?? false) && x.Cards.All(e => cards.Any(c => c.Id == e.Id && c.Count >= e.Count))); if (deck == null && (deck = CreateDungeonDeck(playerClass)) == null) { Log.Info($"No existing deck - can't find default deck for {playerClass}"); return; } if (cards.All(c => deck.Cards.Any(e => c.Id == e.Id && c.Count == e.Count))) { Log.Info("No new cards"); return; } deck.Cards.Clear(); Helper.SortCardCollection(cards, false); foreach (var card in cards) { deck.Cards.Add(card); } deck.LastEdited = DateTime.Now; DeckList.Save(); Core.UpdatePlayerCards(true); Log.Info("Updated dungeon run deck"); }
private string GetDungeonTitleStr() { DungeonInfo dungeonInfo = DungeonDetailProxy.instance.DungeonInfo; string s = string.Format(Localization.Get("ui.dungeon_detail_view.dungeon_title"), Localization.Get(dungeonInfo.dungeonData.order_name), Localization.Get(dungeonInfo.dungeonData.name)); return(s); }
public static List <PathData> GetPathDatas(GameResData gameResData, int limitCount) { List <PathData> pathDataList = new List <PathData>(); DropMessageData data = DropMessageData.GetDropMsgDataByResData(gameResData, true); if (data == null) { return(null); } else { Dictionary <GoodsJumpType, List <int> > jumpDic = data.JumpDic; int index = 0; foreach (var value in jumpDic) { if (value.Key == GoodsJumpType.Jump_Dungeon) { List <int> idList = value.Value; int id; for (int i = 0; i < idList.Count; i++) { id = idList[i]; int remaindCount = limitCount - index; DungeonInfo dInfo = DungeonProxy.instance.GetDungeonInfo(id); if (dInfo == null) { Debugger.LogError("dungeon can not find in jump path, id:" + id); } else if (!dInfo.isLock || i < remaindCount) { pathDataList.Add(new PathData(value.Key, id)); index++; if (index == limitCount) { break; } } } } else { List <int> idList = value.Value; int id; for (int i = 0; i < idList.Count; i++) { id = idList[i]; pathDataList.Add(new PathData(value.Key, id)); index++; if (index == limitCount) { break; } } } } } return(pathDataList); }
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); }
public void ClickNextChapterButtonHandler() { if (_currentSelectChapterData.NextChapterData != null) { int nextChapterFirstDungeonID = _currentSelectChapterData.NextChapterData.GetChapterDungeonIDListOfDungeonType(_currentSelectDungeonType).First(); DungeonInfo nextChapterFirstDungeonInfo = DungeonProxy.instance.GetDungeonInfo(nextChapterFirstDungeonID); if (nextChapterFirstDungeonInfo.isLock) { int accountLevel = Game.Model.GameProxy.instance.AccountLevel; string tips = ""; if (nextChapterFirstDungeonInfo.dungeonData.unlockLevel > 0) { if (accountLevel < nextChapterFirstDungeonInfo.dungeonData.unlockLevel) { tips = string.Format(Localization.Get("ui.select_chapter_view.chapter_unlock_level_not_enough"), nextChapterFirstDungeonInfo.dungeonData.unlockLevel); Tips.View.CommonAutoDestroyTipsView.Open(tips); return; } } if (nextChapterFirstDungeonInfo.dungeonData.unlockDungeonIDPre1 > 0) { DungeonInfo preDungeonInfo = DungeonProxy.instance.GetDungeonInfo(nextChapterFirstDungeonInfo.dungeonData.unlockDungeonIDPre1); string preDungeonName = GetDifficultyNameByDungeonType(preDungeonInfo.dungeonData.dungeonType) + preDungeonInfo.dungeonData.GetOrderName(); if (preDungeonInfo.star <= 0) { tips = string.Format(Localization.Get("ui.select_chapter_view.chapter_unlock_need_pass_dungeon"), preDungeonName); return; } } if (nextChapterFirstDungeonInfo.dungeonData.unlockDungeonIDPre2 > 0) { DungeonInfo preDungeonInfo = DungeonProxy.instance.GetDungeonInfo(nextChapterFirstDungeonInfo.dungeonData.unlockDungeonIDPre2); string preDungeonName = GetDifficultyNameByDungeonType(preDungeonInfo.dungeonData.dungeonType) + preDungeonInfo.dungeonData.GetOrderName(); if (preDungeonInfo.star <= 0) { tips = string.Format(Localization.Get("ui.select_chapter_view.chapter_unlock_need_pass_dungeon"), preDungeonName); return; } } if (nextChapterFirstDungeonInfo.dungeonData.unlockStarCount > 0) { int ownStarCount = DungeonProxy.instance.GetTotalStarCountOfDungeonType(nextChapterFirstDungeonInfo.dungeonData.unlockStarDungeonType); if (ownStarCount < nextChapterFirstDungeonInfo.dungeonData.unlockStarCount) { tips = string.Format(Localization.Get("ui.select_chapter_view.chapter_unlock_level_star_count_not_enough"), nextChapterFirstDungeonInfo.dungeonData.unlockStarCount); return; } } } else { MoveTo(_currentSelectChapterData.NextChapterData, false); } } }
public void GenerateDungeon() { info = DungeonManager.DungeonLoad("Stage1_1"); bool RoomPosition = true; DungeonModel.indexCoridor = 0; SpawnEntrancePoint(); float RoomPositionX = DungeonRoom[0].GetComponent <RectTransform>().offsetMin.x; float RoomPositionY = DungeonRoom[0].GetComponent <RectTransform>().offsetMin.y; for (int RoomIndex = 1; RoomIndex <= info.allRoom; RoomIndex++) { DungeonRoom[RoomIndex] = Instantiate(Room); DungeonRoom[RoomIndex].transform.SetParent(Panel.transform, false); DungeonRoom[RoomIndex].name = RoomIndex + ""; DungeonRoom[RoomIndex].onClick.AddListener(PlayerControl); do { randPos = Random.Range(1, 5); randposition(RoomIndex, RoomPositionX, RoomPositionY); RoomPosition = CheckRoom(RoomIndex, RoomPosition); SpawnCoridor(DungeonModel.indexCoridor, RoomPositionX, RoomPositionY); for (int K = 0; K < DungeonModel.indexCoridor; K++) //Check Coridor { if (DungeonCoridor[K].offsetMin == DungeonCoridor[DungeonModel.indexCoridor].offsetMin) { Destroy(DungeonCoridor[DungeonModel.indexCoridor].gameObject); DungeonModel.indexCoridor -= 1; break; } } RoomPositionX = DungeonRoom[RoomIndex].GetComponent <RectTransform>().offsetMin.x; RoomPositionY = DungeonRoom[RoomIndex].GetComponent <RectTransform>().offsetMin.y; DungeonCoridor[DungeonModel.indexCoridor].gameObject.SetActive(false); DungeonModel.indexCoridor += 1; } while (!RoomPosition); DungeonRoom[RoomIndex].GetComponent <RectTransform>().sizeDelta = new Vector2(70, 70); DungeonRoom[RoomIndex].gameObject.SetActive(false); } SizePanel(); RandomRoomTag(); EventSystem.current.SetSelectedGameObject(DungeonRoom[0].gameObject); EventSystem.current.currentSelectedGameObject.tag = "Entrance"; DungeonRoom[0].GetComponent <Image>().color = Color.cyan; surrender.onClick.AddListener(Surrender); win.onClick.AddListener(WinUI); PlayerControl(); }
private void RefreshPreviousAndNextChapterButtons() { int currentSelectChapterLastDungeonID = _currentSelectChapterData.GetChapterDungeonIDListOfDungeonType(_currentSelectDungeonType).Last(); DungeonInfo currentSelectChapterLastDungeonInfo = DungeonProxy.instance.GetDungeonInfo(currentSelectChapterLastDungeonID); bool shouldShowPreviousChapterButton = _currentSelectChapterData.Id > 1; bool shouldShowNextChapterButton = _currentSelectChapterData.NextChapterData != null && currentSelectChapterLastDungeonInfo.star > 0; previousChapterButton.gameObject.SetActive(shouldShowPreviousChapterButton); nextChapterButton.gameObject.SetActive(shouldShowNextChapterButton); }
protected void Start() { if (!(TerrainMeta.Path == null)) { DungeonInfo dungeonInfo = TerrainMeta.Path.FindClosest(TerrainMeta.Path.DungeonEntrances, base.transform.position); if (!(dungeonInfo == null)) { dungeonInfo.Links.Add(base.gameObject); } } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
// Use this for initialization void Start() { dropdown = GetComponent <Dropdown>(); dbService = GameObject.Find("Connection").GetComponent <DBConnection>(); label = dropdown.transform.Find("Label"); GetDungeons(); info = dungeonInfo.transform.Find("Values").GetComponent <DungeonInfo>(); monster = MonsterInfo.transform.Find("Viewport").Find("Content").GetComponent <MonsterInfo>(); equipment = EquipmentInfo.transform.Find("Viewport").Find("Content").GetComponent <EquipmentInfo>(); dropdown.onValueChanged.AddListener(delegate { UpdateDisplay(); }); }
public void Init(DungeonUI owner, string key) { this.owner = owner; this.dungeonInfo = DungeonDatabase.GetInfo(key); // 제목 텍스트 갱신 this.titleText.text = this.dungeonInfo.title; // 컨텐츠 텍스트 갱신 this.contentText.text = this.dungeonInfo.content; }
private void CenterCameraToDungeon() { // center GameObject parent = DungeonGenerator.instance.GetWorldParent(); if (parent != null) { DungeonInfo info = parent.GetComponent <DungeonInfo>(); transform.position = new Vector3(info.GetWidth() / 2f, info.GetHeight() / 2f, cameraZLevel); } }
public void CLIENT2LOBBY_ACTIVITY_PVE_CHALLENGE_REQ(int dungeonID, bool ispay) { ActivityPveChallengeReq activityPveChallengeReq = new ActivityPveChallengeReq(); activityPveChallengeReq.dungeonId = dungeonID; activityPveChallengeReq.isPaid = ispay; DungeonInfo dungeonInfo = DungeonProxy.instance.GetDungeonInfo(dungeonID); Logic.Fight.Model.FightProxy.instance.ResetCurrentDungeonData(dungeonInfo.dungeonData); Logic.Protocol.ProtocolProxy.instance.SendProtocol(activityPveChallengeReq); }
// Start is called before the first frame update void Start() { currentTime = maxTime; characterCluster = GameObject.FindGameObjectWithTag("CharacterCluster").GetComponent <CharacterCluster>(); dungeonInfo = GameObject.FindGameObjectWithTag("Info").GetComponent <DungeonInfo>(); if (characterCluster.currentMapLocation == 4) { dungeonInfo.SetUpRooms(); } }
public void CLIENT2LOBBY_PVE_FIGHT_REQ(int dungeonID) { PveFightReq pveFightReq = new PveFightReq(); pveFightReq.dungeonId = dungeonID; Logic.TalkingData.Controller.TalkingDataController.instance.TDGAMissionOnBegin(dungeonID.ToString(), Logic.TalkingData.Controller.TalkDataMissionType.Level); DungeonInfo dungeonInfo = DungeonProxy.instance.GetDungeonInfo(dungeonID); DungeonDetailProxy.instance.DungeonInfo = dungeonInfo; Logic.Fight.Model.FightProxy.instance.ResetCurrentDungeonData(dungeonInfo.dungeonData); Logic.Protocol.ProtocolProxy.instance.SendProtocol(pveFightReq); }
public RandomlyGeneratedStateSpace(DungeonInfo data) { stateSpaceComponents = data.stateSpaceComponents; dungeonSpriteFile = data.dungeonSpriteFile; dungeonGrid = data.dungeonGrid; dungeonColorInfo = data.dungeonColorInfo; dungeonDimensions = data.dungeonDimensions; freeTiles = data.freeTiles; PlayerComponent player = stateSpaceComponents.PlayerComponent; player.PlayerJustLoaded = true; stateSpaceComponents.PlayerComponent = player; }
private void OnClickBtnClean(GameObject sender) { DungeonInfo dungeonInfo = DungeonManager.Instance.GetDungeonInfo(this.currentInstanceID); if (dungeonInfo.star < 3) { UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(510091, false)); } else { MopUpDialogUI mopUpDialogUI = UIManagerControl.Instance.OpenUI("MopUpDialogUI", UINodesManager.NormalUIRoot, false, UIType.Pop) as MopUpDialogUI; mopUpDialogUI.RefreshUI(this.currentInstanceID); } }
private void StandardDungeonSetup() { var dungeonInfo = new DungeonInfo(); dungeonInfo.LevelNaming = TraumaWorldGenerator.LevelNaming; Game.Dungeon = new Dungeon(dungeonInfo); Game.Dungeon.Player.StartGameSetup(); Game.Dungeon.Difficulty = difficulty; Game.Dungeon.Player.Name = playerName; Game.Dungeon.Player.PlayItemMovies = playItemMovies; Game.Dungeon.AllLocksOpen = false; if(Game.Config.DebugMode) Game.Dungeon.PlayerImmortal = true; }