迁移 EntityData 到 Base 中
- 新增 EntityDataFactory 工厂类,提供创建 EntityData 的统一入口 - 移出 EntityData 及派生类对 GameEntry 的依赖并移入 SepCore.Base 程序集中
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using SepCore.Definition;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Entity.EntityData
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class AccessoryObjectData : EntityDataBase
|
||||
{
|
||||
[SerializeField] private int _ownerId = 0;
|
||||
|
||||
[SerializeField] private CampType _ownerCamp = CampType.Unknown;
|
||||
|
||||
public AccessoryObjectData(int entityId, int typeId, int ownerId, CampType ownerCamp)
|
||||
: base(entityId, typeId)
|
||||
{
|
||||
_ownerId = ownerId;
|
||||
_ownerCamp = ownerCamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 拥有者编号。
|
||||
/// </summary>
|
||||
public int OwnerId => _ownerId;
|
||||
|
||||
/// <summary>
|
||||
/// 拥有者阵营。
|
||||
/// </summary>
|
||||
public CampType OwnerCamp => _ownerCamp;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user