- 规范 UI 设计成为:
- UIForm 负责展示
- Controller 负责控制
- UseCase 负责业务逻辑
- RawData 负责提供原始数据
- Context 负责为 UIForm 提供数据
- 添加和补充一系列 UI 功能
This commit is contained in:
@@ -1,207 +0,0 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
// 此文件由工具自动生成,请勿直接修改。
|
||||
// 生成时间:2021-06-16 21:54:35.517
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 战机表。
|
||||
/// </summary>
|
||||
public class DRAircraft : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取战机编号。
|
||||
/// </summary>
|
||||
public override int Id
|
||||
{
|
||||
get { return m_Id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取推进器编号。
|
||||
/// </summary>
|
||||
public int ThrusterId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取武器编号0。
|
||||
/// </summary>
|
||||
public int WeaponId0 { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取武器编号1。
|
||||
/// </summary>
|
||||
public int WeaponId1 { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取武器编号2。
|
||||
/// </summary>
|
||||
public int WeaponId2 { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取装甲编号0。
|
||||
/// </summary>
|
||||
public int ArmorId0 { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取装甲编号1。
|
||||
/// </summary>
|
||||
public int ArmorId1 { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取装甲编号2。
|
||||
/// </summary>
|
||||
public int ArmorId2 { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取死亡特效编号。
|
||||
/// </summary>
|
||||
public int DeadEffectId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取死亡声音编号。
|
||||
/// </summary>
|
||||
public int DeadSoundId { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
for (int i = 0; i < columnStrings.Length; i++)
|
||||
{
|
||||
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
ThrusterId = int.Parse(columnStrings[index++]);
|
||||
WeaponId0 = int.Parse(columnStrings[index++]);
|
||||
WeaponId1 = int.Parse(columnStrings[index++]);
|
||||
WeaponId2 = int.Parse(columnStrings[index++]);
|
||||
ArmorId0 = int.Parse(columnStrings[index++]);
|
||||
ArmorId1 = int.Parse(columnStrings[index++]);
|
||||
ArmorId2 = int.Parse(columnStrings[index++]);
|
||||
DeadEffectId = int.Parse(columnStrings[index++]);
|
||||
DeadSoundId = int.Parse(columnStrings[index++]);
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
|
||||
{
|
||||
using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
|
||||
{
|
||||
m_Id = binaryReader.Read7BitEncodedInt32();
|
||||
ThrusterId = binaryReader.Read7BitEncodedInt32();
|
||||
WeaponId0 = binaryReader.Read7BitEncodedInt32();
|
||||
WeaponId1 = binaryReader.Read7BitEncodedInt32();
|
||||
WeaponId2 = binaryReader.Read7BitEncodedInt32();
|
||||
ArmorId0 = binaryReader.Read7BitEncodedInt32();
|
||||
ArmorId1 = binaryReader.Read7BitEncodedInt32();
|
||||
ArmorId2 = binaryReader.Read7BitEncodedInt32();
|
||||
DeadEffectId = binaryReader.Read7BitEncodedInt32();
|
||||
DeadSoundId = binaryReader.Read7BitEncodedInt32();
|
||||
}
|
||||
}
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
private KeyValuePair<int, int>[] m_WeaponId = null;
|
||||
|
||||
public int WeaponIdCount
|
||||
{
|
||||
get { return m_WeaponId.Length; }
|
||||
}
|
||||
|
||||
public int GetWeaponId(int id)
|
||||
{
|
||||
foreach (KeyValuePair<int, int> i in m_WeaponId)
|
||||
{
|
||||
if (i.Key == id)
|
||||
{
|
||||
return i.Value;
|
||||
}
|
||||
}
|
||||
|
||||
throw new GameFrameworkException(Utility.Text.Format("GetWeaponId with invalid id '{0}'.", id));
|
||||
}
|
||||
|
||||
public int GetWeaponIdAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= m_WeaponId.Length)
|
||||
{
|
||||
throw new GameFrameworkException(Utility.Text.Format("GetWeaponIdAt with invalid index '{0}'.", index));
|
||||
}
|
||||
|
||||
return m_WeaponId[index].Value;
|
||||
}
|
||||
|
||||
private KeyValuePair<int, int>[] m_ArmorId = null;
|
||||
|
||||
public int ArmorIdCount
|
||||
{
|
||||
get { return m_ArmorId.Length; }
|
||||
}
|
||||
|
||||
public int GetArmorId(int id)
|
||||
{
|
||||
foreach (KeyValuePair<int, int> i in m_ArmorId)
|
||||
{
|
||||
if (i.Key == id)
|
||||
{
|
||||
return i.Value;
|
||||
}
|
||||
}
|
||||
|
||||
throw new GameFrameworkException(Utility.Text.Format("GetArmorId with invalid id '{0}'.", id));
|
||||
}
|
||||
|
||||
public int GetArmorIdAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= m_ArmorId.Length)
|
||||
{
|
||||
throw new GameFrameworkException(Utility.Text.Format("GetArmorIdAt with invalid index '{0}'.", index));
|
||||
}
|
||||
|
||||
return m_ArmorId[index].Value;
|
||||
}
|
||||
|
||||
private void GeneratePropertyArray()
|
||||
{
|
||||
m_WeaponId = new KeyValuePair<int, int>[]
|
||||
{
|
||||
new KeyValuePair<int, int>(0, WeaponId0),
|
||||
new KeyValuePair<int, int>(1, WeaponId1),
|
||||
new KeyValuePair<int, int>(2, WeaponId2),
|
||||
};
|
||||
|
||||
m_ArmorId = new KeyValuePair<int, int>[]
|
||||
{
|
||||
new KeyValuePair<int, int>(0, ArmorId0),
|
||||
new KeyValuePair<int, int>(1, ArmorId1),
|
||||
new KeyValuePair<int, int>(2, ArmorId2),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7a6297d01a7dc348b1488bf6245cb1b
|
||||
timeCreated: 1528026147
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,85 +0,0 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
// 此文件由工具自动生成,请勿直接修改。
|
||||
// 生成时间:2021-06-16 21:54:35.539
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 装甲表。
|
||||
/// </summary>
|
||||
public class DRArmor : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取装甲编号。
|
||||
/// </summary>
|
||||
public override int Id
|
||||
{
|
||||
get { return m_Id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取最大生命。
|
||||
/// </summary>
|
||||
public int MaxHP { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取防御力。
|
||||
/// </summary>
|
||||
public int Defense { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
for (int i = 0; i < columnStrings.Length; i++)
|
||||
{
|
||||
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
MaxHP = int.Parse(columnStrings[index++]);
|
||||
Defense = int.Parse(columnStrings[index++]);
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
|
||||
{
|
||||
using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
|
||||
{
|
||||
m_Id = binaryReader.Read7BitEncodedInt32();
|
||||
MaxHP = binaryReader.Read7BitEncodedInt32();
|
||||
Defense = binaryReader.Read7BitEncodedInt32();
|
||||
}
|
||||
}
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void GeneratePropertyArray()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e945cefd12dc05428a0b4d287784707
|
||||
timeCreated: 1528026147
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,113 +0,0 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
// 此文件由工具自动生成,请勿直接修改。
|
||||
// 生成时间:2021-06-16 21:54:35.557
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 小行星表。
|
||||
/// </summary>
|
||||
public class DRAsteroid : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取小行星编号。
|
||||
/// </summary>
|
||||
public override int Id
|
||||
{
|
||||
get { return m_Id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取最大生命。
|
||||
/// </summary>
|
||||
public int MaxHP { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取冲击力。
|
||||
/// </summary>
|
||||
public int Attack { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取速度。
|
||||
/// </summary>
|
||||
public float Speed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取角速度。
|
||||
/// </summary>
|
||||
public float AngularSpeed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取死亡特效编号。
|
||||
/// </summary>
|
||||
public int DeadEffectId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取死亡声音编号。
|
||||
/// </summary>
|
||||
public int DeadSoundId { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
for (int i = 0; i < columnStrings.Length; i++)
|
||||
{
|
||||
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
MaxHP = int.Parse(columnStrings[index++]);
|
||||
Attack = int.Parse(columnStrings[index++]);
|
||||
Speed = float.Parse(columnStrings[index++]);
|
||||
AngularSpeed = float.Parse(columnStrings[index++]);
|
||||
DeadEffectId = int.Parse(columnStrings[index++]);
|
||||
DeadSoundId = int.Parse(columnStrings[index++]);
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
|
||||
{
|
||||
using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
|
||||
{
|
||||
m_Id = binaryReader.Read7BitEncodedInt32();
|
||||
MaxHP = binaryReader.Read7BitEncodedInt32();
|
||||
Attack = binaryReader.Read7BitEncodedInt32();
|
||||
Speed = binaryReader.ReadSingle();
|
||||
AngularSpeed = binaryReader.ReadSingle();
|
||||
DeadEffectId = binaryReader.Read7BitEncodedInt32();
|
||||
DeadSoundId = binaryReader.Read7BitEncodedInt32();
|
||||
}
|
||||
}
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void GeneratePropertyArray()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,16 +18,6 @@ namespace DataTable
|
||||
/// </summary>
|
||||
public GoodsType GoodsType { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取最低价格
|
||||
/// </summary>
|
||||
public int MinPrice { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取最高价格
|
||||
/// </summary>
|
||||
public int MaxPrice { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取商品对应具体类型的表Id
|
||||
/// </summary>
|
||||
@@ -43,8 +33,6 @@ namespace DataTable
|
||||
m_Id = int.Parse(fields[index++]);
|
||||
index++;
|
||||
GoodsType = EnumUtility<GoodsType>.Get(fields[index++]);
|
||||
MinPrice = int.Parse(fields[index++]);
|
||||
MaxPrice = int.Parse(fields[index++]);
|
||||
GoodsTypeId = int.Parse(fields[index++]);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using Definition.DataStruct;
|
||||
using Newtonsoft.Json;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
public class DRLevelUpReward : DataRowBase
|
||||
{
|
||||
private int m_Id;
|
||||
|
||||
public override int Id => m_Id;
|
||||
|
||||
public string Title { get; private set; }
|
||||
|
||||
public string IconAssetName { get; private set; }
|
||||
|
||||
public StatModifier[] Modifiers { 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++;
|
||||
Title = fields[index++];
|
||||
IconAssetName = fields[index++];
|
||||
Modifiers = JsonConvert.DeserializeObject<StatModifier[]>(fields[index++]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 836a293c79cb42e42a7235ebdeb3344f
|
||||
timeCreated: 1528026147
|
||||
licenseType: Pro
|
||||
guid: d84933d61f76d7942a903b8db26a3ad6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
@@ -1,7 +1,9 @@
|
||||
using Definition.DataStruct;
|
||||
using GameFramework;
|
||||
using Newtonsoft.Json;
|
||||
using StarForce;
|
||||
using UnityGameFramework.Runtime;
|
||||
using Definition.Enum;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
@@ -12,6 +14,9 @@ namespace DataTable
|
||||
public override int Id => m_Id;
|
||||
public string Title { get; private set; }
|
||||
public string IconAssetName { get; private set; }
|
||||
public ItemRarity Rarity { get; private set; }
|
||||
public int Price { get; private set; }
|
||||
public float PriceRandomPercent { get; private set; }
|
||||
public StatModifier[] Modifiers { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
@@ -24,6 +29,9 @@ namespace DataTable
|
||||
index++;
|
||||
Title = fields[index++];
|
||||
IconAssetName = fields[index++];
|
||||
Rarity = EnumUtility<ItemRarity>.Get(fields[index++]);
|
||||
Price = int.Parse(fields[index++]);
|
||||
PriceRandomPercent = float.Parse(fields[index++]);
|
||||
Modifiers = JsonConvert.DeserializeObject<StatModifier[]>(fields[index++]);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
// 此文件由工具自动生成,请勿直接修改。
|
||||
// 生成时间:2021-06-16 21:54:35.638
|
||||
//------------------------------------------------------------
|
||||
|
||||
using GameFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace DataTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 推进器表。
|
||||
/// </summary>
|
||||
public class DRThruster : DataRowBase
|
||||
{
|
||||
private int m_Id = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取推进器编号。
|
||||
/// </summary>
|
||||
public override int Id
|
||||
{
|
||||
get { return m_Id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取。
|
||||
/// </summary>
|
||||
public float Speed { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
for (int i = 0; i < columnStrings.Length; i++)
|
||||
{
|
||||
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
Speed = float.Parse(columnStrings[index++]);
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
|
||||
{
|
||||
using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
|
||||
{
|
||||
m_Id = binaryReader.Read7BitEncodedInt32();
|
||||
Speed = binaryReader.ReadSingle();
|
||||
}
|
||||
}
|
||||
|
||||
GeneratePropertyArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void GeneratePropertyArray()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9b85e7308914ee49bacd872a67716aa
|
||||
timeCreated: 1528026148
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -26,12 +26,16 @@ namespace DataTable
|
||||
/// 获取武器名称。
|
||||
/// </summary>
|
||||
public string Title { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取图标资源名称。
|
||||
/// </summary>
|
||||
public string IconAssetName { get; private set; }
|
||||
|
||||
public ItemRarity Rarity { get; private set; }
|
||||
public int Price { get; private set; }
|
||||
public float PriceRandomPercent { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取武器伤害。
|
||||
/// </summary>
|
||||
@@ -51,7 +55,7 @@ namespace DataTable
|
||||
/// 获取武器攻击音效。
|
||||
/// </summary>
|
||||
public int AttackSoundId { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取武器额外参数。
|
||||
/// </summary>
|
||||
@@ -72,6 +76,9 @@ namespace DataTable
|
||||
index++;
|
||||
Title = columnStrings[index++];
|
||||
IconAssetName = columnStrings[index++];
|
||||
Rarity = EnumUtility<ItemRarity>.Get(columnStrings[index++]);
|
||||
Price = int.Parse(columnStrings[index++]);
|
||||
PriceRandomPercent = float.Parse(columnStrings[index++]);
|
||||
Attack = int.Parse(columnStrings[index++]);
|
||||
Cooldown = float.Parse(columnStrings[index++]);
|
||||
AttackRange = float.Parse(columnStrings[index++]);
|
||||
@@ -80,7 +87,7 @@ namespace DataTable
|
||||
Modifiers = Utility.Json.ToObject<StatModifier[]>(columnStrings[index++]);
|
||||
|
||||
GeneratePropertyArray();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user