From 27a6b995be77dd0c8cb2fb624510a3e594808cd7 Mon Sep 17 00:00:00 2001 From: Ino Date: Fri, 24 Jan 2025 05:50:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AF=B8=EB=AF=B9=20=EB=8D=98=EC=A0=84=20?= =?UTF-8?q?=EC=9D=B8=EA=B2=8C=EC=9E=84=20=EB=82=B4=20=EC=A0=95=EB=B3=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Ino_nerdnavis.txt | 5 ++- Assets/Res_Addr/MainUI/NewGameUI.prefab | 35 ++++++++++++++++--- Assets/Script/Server/ServerClass.cs | 20 +++++++---- Assets/Script/UI/Common/ArrowUI.cs | 10 +++--- Assets/Script/UI/Common/MoneyForm.cs | 10 ++++++ .../UI/Ingame/Dungeon/Ingame_DungeonBase.cs | 10 ++++++ Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs | 11 +++--- 7 files changed, 80 insertions(+), 21 deletions(-) diff --git a/Assets/Ino_nerdnavis.txt b/Assets/Ino_nerdnavis.txt index 81f3a407b..774914720 100644 --- a/Assets/Ino_nerdnavis.txt +++ b/Assets/Ino_nerdnavis.txt @@ -50,4 +50,7 @@ messageinfo 엄청 느린 버그 추가 컨텐츠 (미믹 던전) - 추가 컨텐츠 서버 정보 (몇 스텝까지 클리어했는 가?) - - 입장권 매일 충전 : 2장까지 충전, 단 2장이상 가지고 있으면 충전 안됨 \ No newline at end of file + - 입장권 매일 충전 : 2장까지 충전, 단 2장이상 가지고 있으면 충전 안됨 + - 기본 공격 시 주변에 몹이 있다면 몹을 바라보게 + - 펫 왜 공격 안하냐 + - 미믹 던전 클리어 후 다음 레벨로 \ No newline at end of file diff --git a/Assets/Res_Addr/MainUI/NewGameUI.prefab b/Assets/Res_Addr/MainUI/NewGameUI.prefab index 3d6e091a6..f4dc5b93c 100644 --- a/Assets/Res_Addr/MainUI/NewGameUI.prefab +++ b/Assets/Res_Addr/MainUI/NewGameUI.prefab @@ -1779,10 +1779,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 5809321694354080930} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &207571553245711454 GameObject: @@ -9055,7 +9055,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &5809321694354080930 RectTransform: m_ObjectHideFlags: 0 @@ -17296,6 +17296,9 @@ MonoBehaviour: texts_base: - {fileID: 3601867451939541280} - {fileID: 730646458019674452} + rewards: + - {fileID: 5889812883037066294} + - {fileID: 3893521988147105288} texts_mimic: - {fileID: 4312145534442857486} --- !u!1 &1749035969668327883 @@ -97913,6 +97916,18 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 150bed98d110cb24292c78f18534decd, type: 3} +--- !u!114 &3893521988147105288 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: -6408983573810322809, guid: 150bed98d110cb24292c78f18534decd, + type: 3} + m_PrefabInstance: {fileID: 1226710811256728719} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b055af6abeefd104995ea4fdfcd9b939, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!224 &8846535214480355421 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 7765070059004976338, guid: 150bed98d110cb24292c78f18534decd, @@ -118659,6 +118674,18 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 8553011865608353457} m_PrefabAsset: {fileID: 0} +--- !u!114 &5889812883037066294 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: -6408983573810322809, guid: 150bed98d110cb24292c78f18534decd, + type: 3} + m_PrefabInstance: {fileID: 8553011865608353457} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b055af6abeefd104995ea4fdfcd9b939, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &8595916662423615271 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Script/Server/ServerClass.cs b/Assets/Script/Server/ServerClass.cs index 2082bde52..7611a1ed3 100644 --- a/Assets/Script/Server/ServerClass.cs +++ b/Assets/Script/Server/ServerClass.cs @@ -74,7 +74,7 @@ public partial class ServerData public Dictionary MobKill = new Dictionary(); // 몬스터 id, 처치 수 public SD_Farm Farm; /// - /// { 던전타입, 0 Lv, 1 소탕값 } + /// { 던전타입, 0 Lv, 1 소탕값1, 2 소탕값2, 3 소탕값3 } /// public Dictionary> Dungeon = new Dictionary>(); @@ -931,11 +931,6 @@ public partial class ServerData Dictionary dic_dungeonkey = new Dictionary { { eDungeon.d1_Mimic, "d1_Mimic" }, { eDungeon.d2_Maze, "d2_Maze" }, { eDungeon.d3_Nightmare, "d3_Nightmare" }, { eDungeon.d4_Wave, "d4_Wave" }, }; - public int Get_DungeonLv(eDungeon dungeon) - { - if (Dungeon.ContainsKey(dic_dungeonkey[dungeon])) return dic_dungeonkey[dungeon][0]; - return 1; - } public void Init_DungeonTicket() { for (int i = 0; i < 3; i++) @@ -947,6 +942,19 @@ public partial class ServerData Add_Item(ticketid, limit - amount); } } + public int Get_DungeonLv(eDungeon dungeon) + { + if (Dungeon.ContainsKey(dic_dungeonkey[dungeon])) + return Dungeon[dic_dungeonkey[dungeon]][0]; + return 0; + } + public void Add_DungeonLv(eDungeon dungeon) + { + if (!Dungeon.ContainsKey(dic_dungeonkey[dungeon])) + Dungeon.Add(dic_dungeonkey[dungeon], new List { 0, 0, 0, 0 }); + ++Dungeon[dic_dungeonkey[dungeon]][0]; + Dungeon[dic_dungeonkey[dungeon]][0].RandomizeCryptoKey(); + } #endregion #region Common diff --git a/Assets/Script/UI/Common/ArrowUI.cs b/Assets/Script/UI/Common/ArrowUI.cs index ea906648a..5a5710e82 100644 --- a/Assets/Script/UI/Common/ArrowUI.cs +++ b/Assets/Script/UI/Common/ArrowUI.cs @@ -10,14 +10,15 @@ public class ArrowUI : MonoBehaviour public TextMeshProUGUI label_count; ObscuredInt m_TotalAmount, m_MaxCount; - int m_Unit, m_UnitIndex = 0; + int m_Unit, m_UnitIndex = 0, m_MinValue; Action m_Act; - public void Set(Action _act, int _maxCount, bool _setMax = true) + public void Set(Action _act, int _maxCount, bool _setMax = true, int _minvalue = 0) { m_Act = _act; m_MaxCount = _maxCount; m_MaxCount.RandomizeCryptoKey(); + m_MinValue = _minvalue; OnClick_Unit(m_UnitIndex); if (_setMax) OnClick_RightMax(); else OnClick_LeftMax(); @@ -32,13 +33,14 @@ public class ArrowUI : MonoBehaviour public void OnClick_LeftMax() { - m_TotalAmount = 0; + m_TotalAmount = m_MinValue; Set_Label(); } public void OnClick_Left() { m_TotalAmount -= m_Unit; - if (m_TotalAmount < 0) m_TotalAmount = 0; + if (m_TotalAmount < m_MinValue) + m_TotalAmount = m_MinValue; Set_Label(); } public void OnClick_Right() diff --git a/Assets/Script/UI/Common/MoneyForm.cs b/Assets/Script/UI/Common/MoneyForm.cs index 3e1dae778..26ee327f3 100644 --- a/Assets/Script/UI/Common/MoneyForm.cs +++ b/Assets/Script/UI/Common/MoneyForm.cs @@ -36,4 +36,14 @@ public class MoneyForm : MonoBehaviour { } + + public void Set(int id, int count) + { + icon.sprite = UIAtlasMgr.Ins.Get_Sprite(id); + Set_Amount(count); + } + public void Set_Amount(int count) + { + amount.text = NumberFormatter.FormatNumber(count); + } } \ No newline at end of file diff --git a/Assets/Script/UI/Ingame/Dungeon/Ingame_DungeonBase.cs b/Assets/Script/UI/Ingame/Dungeon/Ingame_DungeonBase.cs index 05a5019fd..4262a15a0 100644 --- a/Assets/Script/UI/Ingame/Dungeon/Ingame_DungeonBase.cs +++ b/Assets/Script/UI/Ingame/Dungeon/Ingame_DungeonBase.cs @@ -4,13 +4,23 @@ using UnityEngine; public class Ingame_DungeonBase : MonoBehaviour { public TextMeshProUGUI[] texts_base; // 0 던전&Lv, 1 남은 시간 + public MoneyForm[] rewards; public virtual void Set(float time) { gameObject.SetActive(true); + Set_DungeonNameLv(); Set_TextTime(time); DungeonInfo.Ins.m_Time = time; DungeonInfo.Ins.act_Time = Set_TextTime; + // TODO 정인호 : 올바른 보상으로 변경 필요 + rewards[0].Set(1, 0); + rewards[1].Set(2, 0); + } + public void Set_DungeonNameLv() + { + var mapData = table_battlemapconfig.Ins.Get_Data(MyValue.MyChoiceMapData.n_MapID); + texts_base[0].text = $"{mapData.Get_Name()} Lv {MyValue.MyChoiceMapData.n_DungeonLv}"; } void Set_TextTime(float time) { texts_base[1].text = Mathf.Max(0f, time).ToString("F2"); } diff --git a/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs b/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs index 310866963..ce0a0be8b 100644 --- a/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs +++ b/Assets/Script/UI/Map/MapChoiceUI_Dungeon.cs @@ -30,18 +30,17 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr MoneyForm_Ticket.Set(500 + MyEnumToInt.Ins.Get_Int(mapData.e_Dungeon)); texts[0].text = mapData.Get_Name(); var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, SelectLv); - var sdata = ServerInfo.Ins.m_ServerData; - // TODO 정인호 : 서버에 현재 클리어 정보 있어야 함 } public void Select_Dungeon(int mapid) { - SelectMapID = mapid; SelectMapID.RandomizeCryptoKey(); - SelectLv = 1; // ServerInfo.Ins.get_ // TODO 정인호 : 던전 레벨 - + var sdata = ServerInfo.Ins.m_ServerData; var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID); var datas = table_dungeonmapconfig.Ins.Get_DataList(mapData.e_Dungeon); - m_ArrowUI.Set(totalcount => { Select_Lv(totalcount); }, datas.Count); + SelectMapID = mapid; SelectMapID.RandomizeCryptoKey(); + SelectLv = sdata.Get_DungeonLv(mapData.e_Dungeon) + 1; + + m_ArrowUI.Set(totalcount => { Select_Lv(totalcount); }, SelectLv, true, 1); Set_UI(); }