- 调整项目结构以适应打包需求
- 添加控制台便于在游戏运行过程中调试各项功能 - 添加 LevelRarity 表,增加了随关卡数动态调整的商品道具品质刷新概率
This commit is contained in:
@@ -7,6 +7,7 @@ namespace DataTable
|
||||
private int m_id;
|
||||
public override int Id => m_id;
|
||||
public int MaxHealth { get; private set; }
|
||||
public int HpAddPerLevel { get; private set; }
|
||||
public float Speed { get; private set; }
|
||||
public int DropCoin { get; private set; }
|
||||
public int DropExp { get; private set; }
|
||||
@@ -21,6 +22,7 @@ namespace DataTable
|
||||
m_id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
MaxHealth = int.Parse(columnStrings[index++]);
|
||||
HpAddPerLevel = int.Parse(columnStrings[index++]);
|
||||
Speed = float.Parse(columnStrings[index++]);
|
||||
DropCoin = int.Parse(columnStrings[index++]);
|
||||
DropExp = int.Parse(columnStrings[index++]);
|
||||
@@ -29,4 +31,4 @@ namespace DataTable
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
public class DRLevelRarity : DataRowBase
|
||||
{
|
||||
private int m_Id;
|
||||
|
||||
public override int Id => m_Id;
|
||||
|
||||
public int LevelMin { get; private set; }
|
||||
public int LevelMax { get; private set; }
|
||||
|
||||
public int WhiteWeight { get; private set; }
|
||||
public int GreenWeight { get; private set; }
|
||||
public int BlueWeight { get; private set; }
|
||||
public int PurpleWeight { get; private set; }
|
||||
public int RedWeight { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] fields = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(fields[index++]);
|
||||
index++;
|
||||
LevelMin = int.Parse(fields[index++]);
|
||||
LevelMax = int.Parse(fields[index++]);
|
||||
WhiteWeight = int.Parse(fields[index++]);
|
||||
GreenWeight = int.Parse(fields[index++]);
|
||||
BlueWeight = int.Parse(fields[index++]);
|
||||
PurpleWeight = int.Parse(fields[index++]);
|
||||
RedWeight = int.Parse(fields[index++]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2be3a3c9896a441496abfb07467e9e19
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,7 @@
|
||||
using Definition.DataStruct;
|
||||
using Definition.Enum;
|
||||
using Newtonsoft.Json;
|
||||
using StarForce;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
@@ -13,6 +15,8 @@ namespace DataTable
|
||||
public string Title { get; private set; }
|
||||
|
||||
public string IconAssetName { get; private set; }
|
||||
|
||||
public ItemRarity Rarity { get; private set; }
|
||||
|
||||
public StatModifier[] Modifiers { get; private set; }
|
||||
|
||||
@@ -26,6 +30,7 @@ namespace DataTable
|
||||
index++;
|
||||
Title = fields[index++];
|
||||
IconAssetName = fields[index++];
|
||||
Rarity = EnumUtility<ItemRarity>.Get(fields[index++]);
|
||||
Modifiers = JsonConvert.DeserializeObject<StatModifier[]>(fields[index++]);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user