작업 타임 int > long변경

This commit is contained in:
김판돌 2024-04-06 18:55:33 +09:00
parent d4590ffdc6
commit 7f8198d83a
20 changed files with 147 additions and 86 deletions

View File

@ -18,7 +18,7 @@ public class ShopUiCtrl : SingletonMonoBehaviour<ShopUiCtrl>
private void OnEnable()
{
Dictionary<long, ShopData> shopDatas = Statics.excelDatas.shopData;
Dictionary<int, ShopData> shopDatas = Statics.excelDatas.shopData;
if(shopDatas.Count != onItemPrefabList.Count)
{
foreach (var item in shopDatas)

View File

@ -512,9 +512,9 @@ public class UnitSetUiCtrl : SingletonMonoBehaviour<UnitSetUiCtrl>
}, 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<UnitSetUiCtrl>
{
//네트워크 통신 필요
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;

View File

@ -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<UnitCtrl> 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;

View File

@ -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)

View File

@ -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; } }
}

View File

@ -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;

View File

@ -0,0 +1,9 @@
public class ChapterData : Excel
{
public int index;
public int story_id;
public int script_id;
public override void toJson()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bde5fa325b20de643904a3ff67a9800e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +1,7 @@
public class ConsumableItemData : Excel
{
public long index;
public int index;
public string name;
public eItemType item_type;
public int reward;

View File

@ -1,8 +1,6 @@
public class EquipmentData : Excel
{
public long index;
public int index;
public string name;
public ePart part;
public int stats1;

View File

@ -4,12 +4,15 @@ using System.Collections.Generic;
public class ExcelDatas
{
public Dictionary<long, UnitData> unitData;
public Dictionary<long, AIData> aiData;
public Dictionary<long, EquipmentData> equipmentData;
public Dictionary<long, ShopData> shopData;
public Dictionary<long, ShopItemData> shopItemData;
public Dictionary<long, ConsumableItemData> consumableItemData;
public Dictionary<int, UnitData> unitData;
public Dictionary<int, AIData> aiData;
public Dictionary<int, EquipmentData> equipmentData;
public Dictionary<int, ShopData> shopData;
public Dictionary<int, ShopItemData> shopItemData;
public Dictionary<int, ConsumableItemData> consumableItemData;
public Dictionary<int, StoryData> storyData;
public Dictionary<int, ChapterData> chapterData;
public Dictionary<int, ScriptData> scriptData;
public IEnumerator<float> ToJson(Action action)
{

View File

@ -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()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5e69f57ce4e57e945a11529e0794aa6a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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()

View File

@ -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()
{

View File

@ -0,0 +1,8 @@
public class StoryData : Excel
{
public int index;
public string name;
public override void toJson()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0c1b8581464efdd43b5e4bba279c6115
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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;

View File

@ -65,8 +65,8 @@ public class LoginResp : Request<LoginResp>
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<DynamicData> dynamic_data { get; set; }
public List<DeckUnitInfo> deck_unit { get; set; }
@ -88,11 +88,11 @@ public class LoginResp : Request<LoginResp>
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<EquipChangeResp>
public DeckUnitInfo deck_unit_info { get; set; }
public Equipment change_equipment { get; set; }
public void Request(Action<EquipChangeResp> onRequestFinished, long unit_id, long equipment_id, bool is_equipment)
public void Request(Action<EquipChangeResp> 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<EquipChangeResp>
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<DeckChangeResp>
private Protocol protocol = Protocol.DeckChange;
public DeckInfo deck_info { get; set; }
public void Request(Action<DeckChangeResp> onRequestFinished, long deck_id, long[] deck_unit)
public void Request(Action<DeckChangeResp> 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<NicknameChangeResp>
{
private Protocol protocol = Protocol.NicknameChange;
public string nickname { get; set; }
public ulong cash { get; set; }
public uint cash { get; set; }
public void Request(Action<NicknameChangeResp> onRequestFinished, string newNickname)
{
@ -172,10 +172,10 @@ public class NicknameChangeResp : Request<NicknameChangeResp>
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<BuyShopItemResp>
{
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<DeckUnitInfo> deck_unit { get; set; }
public List<Equipment> equipment { get; set; }
public List<ConsumableItem> consumableItem { get; set; }
public List<EtcItem> etcItem { get; set; }
public void Request(Action<BuyShopItemResp> onRequestFinished, long shopItemIndex, long reset_id)
public void Request(Action<BuyShopItemResp> 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<BuyShopItemResp>
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; }
}

View File

@ -57,13 +57,13 @@ public class ItemBox
/// </summary>
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);