迁移 EntityData 到 Base 中
- 新增 EntityDataFactory 工厂类,提供创建 EntityData 的统一入口 - 移出 EntityData 及派生类对 GameEntry 的依赖并移入 SepCore.Base 程序集中
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using SepCore.Definition;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Entity.EntityData
|
||||
{
|
||||
[Serializable]
|
||||
public class EnemyProjectileData : EntityDataBase
|
||||
{
|
||||
public EnemyProjectileData(int entityId, int ownerEntityId, CampType ownerCamp, int attackDamage,
|
||||
float speed, float lifeTime, Vector3 direction)
|
||||
: base(entityId, 0)
|
||||
{
|
||||
OwnerEntityId = ownerEntityId;
|
||||
OwnerCamp = ownerCamp;
|
||||
AttackDamage = attackDamage;
|
||||
Speed = speed;
|
||||
LifeTime = lifeTime;
|
||||
Direction = direction;
|
||||
}
|
||||
|
||||
public int OwnerEntityId { get; }
|
||||
public CampType OwnerCamp { get; }
|
||||
public int AttackDamage { get; }
|
||||
public float Speed { get; }
|
||||
public float LifeTime { get; }
|
||||
public Vector3 Direction { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user