第一批重构,主要是物理迁移脚本和部分命名空间的调整
- 结构上迁移文件,将脚本分成 Base/Runtime/Presentation/Procedure/Editor 五大文件夹 - 调整 DataTable 和 Definition 下脚本的命名空间 - 依据 UI-5层架构设计规范 拆分原先的 UI 到 Runtime 和 Presentation 下
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace SepCore.DataTable
|
||||
{
|
||||
/// <summary>
|
||||
/// Bullet config table.
|
||||
/// Id uses BulletType value.
|
||||
/// </summary>
|
||||
public class DRBullet : DataRowBase
|
||||
{
|
||||
private int m_Id;
|
||||
|
||||
public override int Id => m_Id;
|
||||
|
||||
/// <summary>
|
||||
/// 子弹实体 Id,用于在 DREntity 中查询资源路径
|
||||
/// </summary>
|
||||
public int EntityTypeId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子弹速度
|
||||
/// </summary>
|
||||
public float Speed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子弹生存时间
|
||||
/// </summary>
|
||||
public float MaxAliveTime { get; private set; }
|
||||
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
|
||||
|
||||
int index = 0;
|
||||
index++;
|
||||
m_Id = int.Parse(columnStrings[index++]);
|
||||
index++;
|
||||
EntityTypeId = int.Parse(columnStrings[index++]);
|
||||
Speed = float.Parse(columnStrings[index++]);
|
||||
MaxAliveTime = float.Parse(columnStrings[index++]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user