From 7f8198d83aae6faf5c4db0a5cf8161b54784ad11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Sat, 6 Apr 2024 18:55:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=91=EC=97=85=20=ED=83=80=EC=9E=84=20int?= =?UTF-8?q?=20>=20long=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/1_Script/GameUI/ShopUiCtrl.cs | 2 +- .../Assets/1_Script/GameUI/UnitSetUiCtrl.cs | 6 +- Client/Assets/1_Script/Info/UnitCtrl.cs | 5 +- Client/Assets/1_Script/Prefab/DeckPrefab.cs | 6 +- Client/Assets/1_Script/Prefab/UnitPrefab.cs | 2 +- Client/Assets/1_Script/System/Datas/AIData.cs | 3 +- .../1_Script/System/Datas/ChapterData.cs | 9 ++ .../1_Script/System/Datas/ChapterData.cs.meta | 11 ++ .../System/Datas/ConsumableItemData.cs | 2 +- .../1_Script/System/Datas/EquipmentData.cs | 4 +- .../1_Script/System/Datas/ExcelDatas.cs | 15 ++- .../1_Script/System/Datas/ScriptData.cs | 12 ++ .../1_Script/System/Datas/ScriptData.cs.meta | 11 ++ .../Assets/1_Script/System/Datas/ShopData.cs | 2 +- .../1_Script/System/Datas/ShopItemData.cs | 8 +- .../Assets/1_Script/System/Datas/StoryData.cs | 8 ++ .../1_Script/System/Datas/StoryData.cs.meta | 11 ++ .../Assets/1_Script/System/Datas/UnitData.cs | 2 +- .../Assets/1_Script/System/Http/Protocol.cs | 108 +++++++++--------- Client/Assets/1_Script/System/ItemManager.cs | 6 +- 20 files changed, 147 insertions(+), 86 deletions(-) create mode 100644 Client/Assets/1_Script/System/Datas/ChapterData.cs create mode 100644 Client/Assets/1_Script/System/Datas/ChapterData.cs.meta create mode 100644 Client/Assets/1_Script/System/Datas/ScriptData.cs create mode 100644 Client/Assets/1_Script/System/Datas/ScriptData.cs.meta create mode 100644 Client/Assets/1_Script/System/Datas/StoryData.cs create mode 100644 Client/Assets/1_Script/System/Datas/StoryData.cs.meta diff --git a/Client/Assets/1_Script/GameUI/ShopUiCtrl.cs b/Client/Assets/1_Script/GameUI/ShopUiCtrl.cs index eee711bf..6e00fd52 100644 --- a/Client/Assets/1_Script/GameUI/ShopUiCtrl.cs +++ b/Client/Assets/1_Script/GameUI/ShopUiCtrl.cs @@ -18,7 +18,7 @@ public class ShopUiCtrl : SingletonMonoBehaviour private void OnEnable() { - Dictionary shopDatas = Statics.excelDatas.shopData; + Dictionary shopDatas = Statics.excelDatas.shopData; if(shopDatas.Count != onItemPrefabList.Count) { foreach (var item in shopDatas) diff --git a/Client/Assets/1_Script/GameUI/UnitSetUiCtrl.cs b/Client/Assets/1_Script/GameUI/UnitSetUiCtrl.cs index 11eed7ae..221ab010 100644 --- a/Client/Assets/1_Script/GameUI/UnitSetUiCtrl.cs +++ b/Client/Assets/1_Script/GameUI/UnitSetUiCtrl.cs @@ -512,9 +512,9 @@ public class UnitSetUiCtrl : SingletonMonoBehaviour }, selectUnit.id, selectItem.id, selectItem.equip_unit == 0); } - public long DeckSwap(int index, long unit_id) + public int DeckSwap(int index, int unit_id) { - long selectUnitId = selectUnitPrefab.GetUnitId; + int selectUnitId = selectUnitPrefab.GetUnitId; for (int n = 0; n < DeckPrefabs.Length; n++) { if (DeckPrefabs[n].GetIndex == index) @@ -531,7 +531,7 @@ public class UnitSetUiCtrl : SingletonMonoBehaviour { //³×Æ®¿öÅ© Åë½Å ÇÊ¿ä DeckChangeResp request = new DeckChangeResp(); - long[] deckUnits = new long[9]; + int[] deckUnits = new int[9]; for(int n = 0; n < DeckPrefabs.Length; n++) { deckUnits[n] = DeckPrefabs[n].GetUnitId; diff --git a/Client/Assets/1_Script/Info/UnitCtrl.cs b/Client/Assets/1_Script/Info/UnitCtrl.cs index 29e46b34..c7bb1013 100644 --- a/Client/Assets/1_Script/Info/UnitCtrl.cs +++ b/Client/Assets/1_Script/Info/UnitCtrl.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using UnityEngine; @@ -10,7 +9,7 @@ public class UnitCtrl : MonoBehaviour public Sprite unitSprite; bool isHomeAttack; public BoxCollider2D[] components; - public long tableIndex; + public int tableIndex; List enemyUnits; @@ -21,7 +20,7 @@ public class UnitCtrl : MonoBehaviour bool _isDie = false; public bool isDie { get { return _isDie; } } - public void DataSet(long tableIndex) + public void DataSet(int tableIndex) { //À̰÷Àº ListÀ¯´Ö¿¡°Ô ¼¼ÆÃµÊ this.tableIndex = tableIndex; diff --git a/Client/Assets/1_Script/Prefab/DeckPrefab.cs b/Client/Assets/1_Script/Prefab/DeckPrefab.cs index ea20977a..a6fbd791 100644 --- a/Client/Assets/1_Script/Prefab/DeckPrefab.cs +++ b/Client/Assets/1_Script/Prefab/DeckPrefab.cs @@ -8,9 +8,9 @@ public class DeckPrefab : MonoBehaviour public int GetIndex { get { return index; } } - long unitId; + int unitId; - public long GetUnitId { get { return unitId; } } + public int GetUnitId { get { return unitId; } } public void UnitSet() { @@ -50,7 +50,7 @@ public class DeckPrefab : MonoBehaviour UnitChange(unitId); } - public void UnitChange(long unit_id) + public void UnitChange(int unit_id) { this.unitId = unit_id; if (unit_id == 0) diff --git a/Client/Assets/1_Script/Prefab/UnitPrefab.cs b/Client/Assets/1_Script/Prefab/UnitPrefab.cs index 60cfc21d..da65bb01 100644 --- a/Client/Assets/1_Script/Prefab/UnitPrefab.cs +++ b/Client/Assets/1_Script/Prefab/UnitPrefab.cs @@ -26,5 +26,5 @@ public class UnitPrefab : MonoBehaviour UnitSetUiCtrl.Instance.StatusSet(this, unitData, deckUnitInfo, unitCtrl); } - public long GetUnitId { get { return deckUnitInfo.id; } } + public int GetUnitId { get { return deckUnitInfo.id; } } } diff --git a/Client/Assets/1_Script/System/Datas/AIData.cs b/Client/Assets/1_Script/System/Datas/AIData.cs index 5212fa6b..65c15669 100644 --- a/Client/Assets/1_Script/System/Datas/AIData.cs +++ b/Client/Assets/1_Script/System/Datas/AIData.cs @@ -1,9 +1,8 @@ -using Newtonsoft.Json; using System.Collections.Generic; public class AIData : Excel { - public long index; + public int index; public int chapter; public int stage; public eCommand command; diff --git a/Client/Assets/1_Script/System/Datas/ChapterData.cs b/Client/Assets/1_Script/System/Datas/ChapterData.cs new file mode 100644 index 00000000..87c6eb10 --- /dev/null +++ b/Client/Assets/1_Script/System/Datas/ChapterData.cs @@ -0,0 +1,9 @@ +public class ChapterData : Excel +{ + public int index; + public int story_id; + public int script_id; + public override void toJson() + { + } +} diff --git a/Client/Assets/1_Script/System/Datas/ChapterData.cs.meta b/Client/Assets/1_Script/System/Datas/ChapterData.cs.meta new file mode 100644 index 00000000..478b826a --- /dev/null +++ b/Client/Assets/1_Script/System/Datas/ChapterData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bde5fa325b20de643904a3ff67a9800e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/1_Script/System/Datas/ConsumableItemData.cs b/Client/Assets/1_Script/System/Datas/ConsumableItemData.cs index 66a6c0ca..51ab4b86 100644 --- a/Client/Assets/1_Script/System/Datas/ConsumableItemData.cs +++ b/Client/Assets/1_Script/System/Datas/ConsumableItemData.cs @@ -1,7 +1,7 @@ public class ConsumableItemData : Excel { - public long index; + public int index; public string name; public eItemType item_type; public int reward; diff --git a/Client/Assets/1_Script/System/Datas/EquipmentData.cs b/Client/Assets/1_Script/System/Datas/EquipmentData.cs index 017b58df..6f11a849 100644 --- a/Client/Assets/1_Script/System/Datas/EquipmentData.cs +++ b/Client/Assets/1_Script/System/Datas/EquipmentData.cs @@ -1,8 +1,6 @@ - - public class EquipmentData : Excel { - public long index; + public int index; public string name; public ePart part; public int stats1; diff --git a/Client/Assets/1_Script/System/Datas/ExcelDatas.cs b/Client/Assets/1_Script/System/Datas/ExcelDatas.cs index eefb1b89..d2822441 100644 --- a/Client/Assets/1_Script/System/Datas/ExcelDatas.cs +++ b/Client/Assets/1_Script/System/Datas/ExcelDatas.cs @@ -4,12 +4,15 @@ using System.Collections.Generic; public class ExcelDatas { - public Dictionary unitData; - public Dictionary aiData; - public Dictionary equipmentData; - public Dictionary shopData; - public Dictionary shopItemData; - public Dictionary consumableItemData; + public Dictionary unitData; + public Dictionary aiData; + public Dictionary equipmentData; + public Dictionary shopData; + public Dictionary shopItemData; + public Dictionary consumableItemData; + public Dictionary storyData; + public Dictionary chapterData; + public Dictionary scriptData; public IEnumerator ToJson(Action action) { diff --git a/Client/Assets/1_Script/System/Datas/ScriptData.cs b/Client/Assets/1_Script/System/Datas/ScriptData.cs new file mode 100644 index 00000000..b08ca461 --- /dev/null +++ b/Client/Assets/1_Script/System/Datas/ScriptData.cs @@ -0,0 +1,12 @@ + +public class ScriptData : Excel +{ + public int index; + public int chapter_id; + public int unit_id; + public string text; + public bool buttle; + public override void toJson() + { + } +} diff --git a/Client/Assets/1_Script/System/Datas/ScriptData.cs.meta b/Client/Assets/1_Script/System/Datas/ScriptData.cs.meta new file mode 100644 index 00000000..243ed50a --- /dev/null +++ b/Client/Assets/1_Script/System/Datas/ScriptData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5e69f57ce4e57e945a11529e0794aa6a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/1_Script/System/Datas/ShopData.cs b/Client/Assets/1_Script/System/Datas/ShopData.cs index 2c8025a2..8ae73688 100644 --- a/Client/Assets/1_Script/System/Datas/ShopData.cs +++ b/Client/Assets/1_Script/System/Datas/ShopData.cs @@ -1,7 +1,7 @@ public class ShopData : Excel { - public long index; + public int index; public string name; public eImageType image_type; public override void toJson() diff --git a/Client/Assets/1_Script/System/Datas/ShopItemData.cs b/Client/Assets/1_Script/System/Datas/ShopItemData.cs index eec66b99..e964e671 100644 --- a/Client/Assets/1_Script/System/Datas/ShopItemData.cs +++ b/Client/Assets/1_Script/System/Datas/ShopItemData.cs @@ -1,14 +1,14 @@ public class ShopItemData : Excel { - public long index; + public int index; public string name; - public long shop_index; + public int shop_index; public eBuyType buy_type; public int buy; - public long reward; + public int reward; public int buy_count; - public long id = -1; + public int id = -1; public override void toJson() { diff --git a/Client/Assets/1_Script/System/Datas/StoryData.cs b/Client/Assets/1_Script/System/Datas/StoryData.cs new file mode 100644 index 00000000..8df648ae --- /dev/null +++ b/Client/Assets/1_Script/System/Datas/StoryData.cs @@ -0,0 +1,8 @@ +public class StoryData : Excel +{ + public int index; + public string name; + public override void toJson() + { + } +} diff --git a/Client/Assets/1_Script/System/Datas/StoryData.cs.meta b/Client/Assets/1_Script/System/Datas/StoryData.cs.meta new file mode 100644 index 00000000..ae250fc7 --- /dev/null +++ b/Client/Assets/1_Script/System/Datas/StoryData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0c1b8581464efdd43b5e4bba279c6115 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/1_Script/System/Datas/UnitData.cs b/Client/Assets/1_Script/System/Datas/UnitData.cs index 4e63dff5..3a36f31d 100644 --- a/Client/Assets/1_Script/System/Datas/UnitData.cs +++ b/Client/Assets/1_Script/System/Datas/UnitData.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; public class UnitData : Excel { - public long index; + public int index; public string name; public int hp; public int attack; diff --git a/Client/Assets/1_Script/System/Http/Protocol.cs b/Client/Assets/1_Script/System/Http/Protocol.cs index 68cdced7..b0ceb583 100644 --- a/Client/Assets/1_Script/System/Http/Protocol.cs +++ b/Client/Assets/1_Script/System/Http/Protocol.cs @@ -65,8 +65,8 @@ public class LoginResp : Request private Protocol protocol = Protocol.Login; public string uuid { get; set; } public string nickname { get; set; } - public ulong gold { get; set; } - public ulong cash { get; set; } + public uint gold { get; set; } + public uint cash { get; set; } public bool new_user { get; set; } public List dynamic_data { get; set; } public List deck_unit { get; set; } @@ -88,11 +88,11 @@ public class LoginResp : Request public class EquipChangeReq { public string uuid { get; set; } - public long unit_id { get; set; } - public long equipment_id { get; set; } + public int unit_id { get; set; } + public int equipment_id { get; set; } public bool is_equipment { get; set; } - public EquipChangeReq(long unit_id, long equipment_id, bool is_equipment) + public EquipChangeReq(int unit_id, int equipment_id, bool is_equipment) { this.uuid = Statics.uuid; this.unit_id = unit_id; @@ -108,7 +108,7 @@ public class EquipChangeResp : Request public DeckUnitInfo deck_unit_info { get; set; } public Equipment change_equipment { get; set; } - public void Request(Action onRequestFinished, long unit_id, long equipment_id, bool is_equipment) + public void Request(Action onRequestFinished, int unit_id, int equipment_id, bool is_equipment) { CreateRequest(protocol, onRequestFinished, new EquipChangeReq(unit_id, equipment_id, is_equipment), HTTPMethods.Post, null); } @@ -119,10 +119,10 @@ public class EquipChangeResp : Request public class DeckChangeReq { public string uuid { get; set; } - public long deck_id { get; set; } - public long[] deck_unit { get; set; } + public int deck_id { get; set; } + public int[] deck_unit { get; set; } - public DeckChangeReq(long deck_id, long[] deck_unit) + public DeckChangeReq(int deck_id, int[] deck_unit) { this.uuid = Statics.uuid; this.deck_id = deck_id; @@ -135,7 +135,7 @@ public class DeckChangeResp : Request private Protocol protocol = Protocol.DeckChange; public DeckInfo deck_info { get; set; } - public void Request(Action onRequestFinished, long deck_id, long[] deck_unit) + public void Request(Action onRequestFinished, int deck_id, int[] deck_unit) { CreateRequest(protocol, onRequestFinished, new DeckChangeReq(deck_id, deck_unit), HTTPMethods.Post, null); } @@ -159,7 +159,7 @@ public class NicknameChangeResp : Request { private Protocol protocol = Protocol.NicknameChange; public string nickname { get; set; } - public ulong cash { get; set; } + public uint cash { get; set; } public void Request(Action onRequestFinished, string newNickname) { @@ -172,10 +172,10 @@ public class NicknameChangeResp : Request public class BuyShopItemReq { public string uuid { get; set; } - public long shopItemIndex { get; set; } - public long reset_id { get; set; } + public int shopItemIndex { get; set; } + public int reset_id { get; set; } - public BuyShopItemReq(long shopItemIndex, long reset_id) + public BuyShopItemReq(int shopItemIndex, int reset_id) { this.uuid = Statics.uuid; this.shopItemIndex = shopItemIndex; @@ -187,16 +187,16 @@ public class BuyShopItemResp : Request { private Protocol protocol = Protocol.BuyShopItem; - public long addGold { get; set; } - public long addCash { get; set; } - public ulong gold { get; set; } - public ulong cash { get; set; } + public int addGold { get; set; } + public int addCash { get; set; } + public uint gold { get; set; } + public uint cash { get; set; } public List deck_unit { get; set; } public List equipment { get; set; } public List consumableItem { get; set; } public List etcItem { get; set; } - public void Request(Action onRequestFinished, long shopItemIndex, long reset_id) + public void Request(Action onRequestFinished, int shopItemIndex, int reset_id) { CreateRequest(protocol, onRequestFinished, new BuyShopItemReq(shopItemIndex, reset_id), HTTPMethods.Post, null); } @@ -205,26 +205,26 @@ public class BuyShopItemResp : Request public class DynamicData { - public long id { get; set; } + public int id { get; set; } public string name { get; set; } public string value { get; set; } } public class DeckUnitInfo { - public long id { get; set; } - public long unit_data_id { get; set; } - public long equip0_id { get; set; } - public long equip1_id { get; set; } - public long equip2_id { get; set; } - public long equip3_id { get; set; } - public long equip4_id { get; set; } - public long equip5_id { get; set; } + public int id { get; set; } + public int unit_data_id { get; set; } + public int equip0_id { get; set; } + public int equip1_id { get; set; } + public int equip2_id { get; set; } + public int equip3_id { get; set; } + public int equip4_id { get; set; } + public int equip5_id { get; set; } [JsonIgnore] public int level { get; set; } [JsonIgnore] - public long saveExp { get; set; } - public long exp { get; set; } + public int saveExp { get; set; } + public int exp { get; set; } public DeckUnitInfo Update(DeckUnitInfo item) { @@ -237,7 +237,7 @@ public class DeckUnitInfo this.exp = item.exp; return this; } - public void Update(long exp, int level) + public void Update(int exp, int level) { if (exp != 0) this.saveExp = exp; @@ -248,10 +248,10 @@ public class DeckUnitInfo public class Equipment { - public long id { get; set; } - public long equip_unit { get; set; } + public int id { get; set; } + public int equip_unit { get; set; } public int rand_stats { get; set; } - public long equipment_data_id { get; set; } + public int equipment_data_id { get; set; } public void Update(Equipment item) { this.equip_unit = item.equip_unit; @@ -261,17 +261,17 @@ public class Equipment public class DeckInfo { - public long id { get; set; } + public int id { get; set; } public int deck_type { get; set; } - public long deck_unit0_id { get; set; } - public long deck_unit1_id { get; set; } - public long deck_unit2_id { get; set; } - public long deck_unit3_id { get; set; } - public long deck_unit4_id { get; set; } - public long deck_unit5_id { get; set; } - public long deck_unit6_id { get; set; } - public long deck_unit7_id { get; set; } - public long deck_unit8_id { get; set; } + public int deck_unit0_id { get; set; } + public int deck_unit1_id { get; set; } + public int deck_unit2_id { get; set; } + public int deck_unit3_id { get; set; } + public int deck_unit4_id { get; set; } + public int deck_unit5_id { get; set; } + public int deck_unit6_id { get; set; } + public int deck_unit7_id { get; set; } + public int deck_unit8_id { get; set; } public void newDataSet(DeckInfo newData) { @@ -292,31 +292,31 @@ public class DeckInfo public class ConsumableItem { - public long id { get; set; } + public int id { get; set; } - public long consumable_item_data_id { get; set; } + public int consumable_item_data_id { get; set; } public int count { get; set; } } public class EtcItem { - public long id { get; set; } + public int id { get; set; } - public long etc_item_data_id { get; set; } + public int etc_item_data_id { get; set; } public int count { get; set; } } public class ResetShopItem { - public long id { get; set; } - public long reset_shop_item_data_id { get; set; } + public int id { get; set; } + public int reset_shop_item_data_id { get; set; } public string name { get; set; } - public long shop_index { get; set; } + public int shop_index { get; set; } public eBuyType buy_type { get; set; } public int buy { get; set; } - public long reward { get; set; } + public int reward { get; set; } public int buy_count { get; set; } public int count { get; set; } public DateTime end_date { get; set; } @@ -324,7 +324,7 @@ public class ResetShopItem public class ShopItem { - public long id { get; set; } - public long shop_item_data_id { get; set; } + public int id { get; set; } + public int shop_item_data_id { get; set; } public DateTime end_date { get; set; } } \ No newline at end of file diff --git a/Client/Assets/1_Script/System/ItemManager.cs b/Client/Assets/1_Script/System/ItemManager.cs index 2be72238..9a8f2122 100644 --- a/Client/Assets/1_Script/System/ItemManager.cs +++ b/Client/Assets/1_Script/System/ItemManager.cs @@ -57,13 +57,13 @@ public class ItemBox /// public void UpdateUnitSpec(DeckUnitInfo unit) { - long saveExp = unit.exp; - long defaultExp = 1024; + int saveExp = unit.exp; + int defaultExp = 1024; int level = 1; while(saveExp > defaultExp) { saveExp -= defaultExp; - defaultExp = (long)(1.2f * defaultExp); + defaultExp = (int)(1.2f * defaultExp); level++; } unit.Update(saveExp, level);