From bdfaf6f726935de194f7d27bb06d93f1466d3d0d Mon Sep 17 00:00:00 2001 From: Ino Date: Tue, 28 Jan 2025 13:23:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=83=81=ED=95=9C=20=EB=AF=B8?= =?UTF-8?q?=EA=B6=81=20=EC=9D=B8=EA=B2=8C=EC=9E=84=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Ino_nerdnavis.txt | 3 +-- Assets/Script/Info/DungeonInfo.cs | 8 +++++-- .../Table/Dungeon/table_dungeonmapconfig.cs | 2 ++ .../UI/Ingame/Dungeon/Ingame_Maze_Portal.cs | 20 ++++++++++++---- Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs | 24 +++++++++++++------ Assets/Script/UI/NewGameUI.cs | 10 +++++--- 6 files changed, 48 insertions(+), 19 deletions(-) diff --git a/Assets/Ino_nerdnavis.txt b/Assets/Ino_nerdnavis.txt index cebae35f5..b1381cd9d 100644 --- a/Assets/Ino_nerdnavis.txt +++ b/Assets/Ino_nerdnavis.txt @@ -54,5 +54,4 @@ messageinfo 엄청 느린 버그 - 맵 벽과 플레이 사이 더 멀게 만들자 - 결과 화면 (보상 지급) - 랭킹 (플레이팹 v2 연결) - - 포탈 타면 레벨 하나 증가시키고 다음 맵 시작 - - 몬스터 스탯 설정 : (lv - 1) * 0.5 + diff --git a/Assets/Script/Info/DungeonInfo.cs b/Assets/Script/Info/DungeonInfo.cs index 688af2871..5fba45db7 100644 --- a/Assets/Script/Info/DungeonInfo.cs +++ b/Assets/Script/Info/DungeonInfo.cs @@ -67,10 +67,8 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate { case eDungeon.d1_Mimic: Stop_Dungeon(true); break; case eDungeon.d2_Maze: - ++m_MazeClear; StopAllCoroutines(); LoadMapMgr.Ins.Set_MazeNextPortal(MyValue.MyChoiceMapData.n_PortalIndex, true); - //MyValue.MyChoiceMapData.Set_MazeMapIndex(); // 포탈 입장 시 break; case eDungeon.d3_Nightmare: break; @@ -142,4 +140,10 @@ public class DungeonInfo : MonoBehaviourSingletonTemplate yield return new WaitForSeconds(1f); StartCoroutine(Co_Update_Time()); } + public void ClearMazeFloor() + { + ++m_MazeClear; + NewGameUI.Ins.Refresh_DungeonUI(m_MazeClear >= 5 ? 1 : 0); + Start_Dungeon(false); + } } \ No newline at end of file diff --git a/Assets/Script/Table/Dungeon/table_dungeonmapconfig.cs b/Assets/Script/Table/Dungeon/table_dungeonmapconfig.cs index 9a5424f33..ef5385392 100644 --- a/Assets/Script/Table/Dungeon/table_dungeonmapconfig.cs +++ b/Assets/Script/Table/Dungeon/table_dungeonmapconfig.cs @@ -81,6 +81,8 @@ public class table_dungeonmapconfig : table_missionbase public List Get_DataList(eDungeon dungeon) { return dic_Data[dungeon]; } public DungeonMapConfigTableData Get_Data_orNull(eDungeon dungeon, int lv) { + if (dungeon == eDungeon.d2_Maze) lv = 1; + for (int i = 0; i < dic_Data[dungeon].Count; i++) { if (dic_Data[dungeon][i].n_MapLv == lv) diff --git a/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze_Portal.cs b/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze_Portal.cs index f69176979..c4f57f1a0 100644 --- a/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze_Portal.cs +++ b/Assets/Script/UI/Ingame/Dungeon/Ingame_Maze_Portal.cs @@ -2,14 +2,24 @@ using UnityEngine; public class Ingame_Maze_Portal : MonoBehaviour { - private void OnEnable() - { - MyValue.m_RealCamera.Set_TargetShow(transform); - } + private void OnEnable() { MyValue.m_RealCamera.Set_TargetShow(transform); } private void OnTriggerEnter(Collider other) { ProcessCollider(other); } private void OnCollisionEnter(Collision collision) { ProcessCollider(collision.collider); } private void ProcessCollider(Collider other) { - Debug.Log(other); + var actor = other.GetComponent(); + if (!DSUtil.CheckNull(actor) && actor.IsRole(eRole.PC)) + { + // 포탈 타면 레벨 하나 증가시키고 다음 맵 시작 + gameObject.SetActive(false); + ++MyValue.MyChoiceMapData.n_DungeonLv; + + // 맵 변경 + MyValue.MyChoiceMapData.Set_MazeMapIndex(); + LoadMapMgr.Ins.Set_MazeMap(MyValue.MyChoiceMapData.n_PortalIndex); + + DungeonInfo.Ins.ClearMazeFloor(); + LoadMapMgr.Ins.Get_PortalPos(MyValue.MyChoiceMapData, pos => { MyValue.MyPC.Set_Warp(pos); }); + } } } \ No newline at end of file diff --git a/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs b/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs index a632722f2..676e1e75e 100644 --- a/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs +++ b/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs @@ -14,7 +14,19 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr public TextMeshProUGUI[] texts_maze; // 0 랭킹, 1 최고 층수 List dungeons = new List { eDungeon.d1_Mimic, eDungeon.d2_Maze, eDungeon.d3_Nightmare, eDungeon.d4_Wave }; - ObscuredInt SelectMapID = 1001, SelectLv; + protected ObscuredInt _SelectMapID = 1001; + public int SelectMapID + { + get { return _SelectMapID; } + set { _SelectMapID = value; _SelectMapID.RandomizeCryptoKey(); } + } + + protected ObscuredInt _SelectLv; + public int SelectLv + { + get { return _SelectLv; } + set { _SelectLv = value; _SelectLv.RandomizeCryptoKey(); } + } private void OnEnable() { @@ -31,7 +43,6 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr { var sdata = ServerInfo.Ins.m_ServerData; SelectMapID = mapid; - SelectMapID.RandomizeCryptoKey(); var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID); SelectLv = sdata.Get_DungeonLv(mapData.e_Dungeon) + 1; var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, SelectLv); @@ -56,19 +67,20 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr m_ArrowUI.Set(totalcount => { Select_Lv(totalcount); }, SelectLv, true, 1); break; case eDungeon.d2_Maze: + SelectLv = Mathf.Max(1, SelectLv - 1); texts_maze[0].text = texts_maze[1].text = ""; ServerInfo.Ins.Get_MyRank("Rank_Maze", my => { if (DSUtil.CheckNull(my)) { texts_maze[0].text = DSUtil.Format(323, 99999); - texts_maze[1].text = DSUtil.Format(324, 0); } else { texts_maze[0].text = DSUtil.Format(323, my.Rank); - texts_maze[1].text = DSUtil.Format(324, my.Scores[0]); + //texts_maze[1].text = DSUtil.Format(324, my.Scores[0]); } + texts_maze[1].text = DSUtil.Format(324, SelectLv); }); break; case eDungeon.d3_Nightmare: @@ -76,12 +88,10 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr case eDungeon.d4_Wave: break; } - - SelectLv.RandomizeCryptoKey(); } public void Select_Lv(int lv) { - SelectLv = lv; SelectLv.RandomizeCryptoKey(); + SelectLv = lv; } public void OnClick_GoDungeon() diff --git a/Assets/Script/UI/NewGameUI.cs b/Assets/Script/UI/NewGameUI.cs index 1612e351d..6ffc0b448 100644 --- a/Assets/Script/UI/NewGameUI.cs +++ b/Assets/Script/UI/NewGameUI.cs @@ -63,15 +63,19 @@ public class NewGameUI : MonoBehaviourSingletonTemplate DSUtil.InActivateGameObjects(gos, 2); gos_etc[0].SetActive(false); DSUtil.InActivateGameObjects(gos_ingame, 1); - var dungeonData = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull(); - if (!DSUtil.CheckNull(dungeonData)) - ingame_dungeon.Set(dungeonData.f_Time, dungeonData.n_MobCount); + Refresh_DungeonUI(); break; } m_BattleUI.Set(eUICardType.Use, ServerInfo.Ins.m_ServerData.Equip.Preset); go_Camera.SetActive(false); } + public void Refresh_DungeonUI(int addmob = 0) + { + var dungeonData = MyValue.MyChoiceMapData.Get_DungeonMapData_orNull(); + if (!DSUtil.CheckNull(dungeonData)) + ingame_dungeon.Set(dungeonData.f_Time, dungeonData.n_MobCount + addmob); + } public TextMeshProUGUI text_joysticktype; public void OnClick_Button(GameObject go)