Start Tag System
This commit is contained in:
@@ -8,27 +8,24 @@ namespace GeometryTD.Entity.EntityData
|
||||
public class BulletData : EntityDataBase
|
||||
{
|
||||
[SerializeField] private Transform _target = null;
|
||||
[SerializeField] private int _damage = 0;
|
||||
[SerializeField] private float _speed = 0f;
|
||||
[SerializeField] private float _maxLifetime = 3f;
|
||||
[SerializeField] private AttackPropertyType _attackPropertyType = AttackPropertyType.None;
|
||||
[SerializeField] private AttackPayload _attackPayload = new AttackPayload();
|
||||
|
||||
public BulletData(
|
||||
int entityId,
|
||||
int typeId,
|
||||
Vector3 position,
|
||||
Transform target,
|
||||
int damage,
|
||||
AttackPayload attackPayload,
|
||||
float speed,
|
||||
AttackPropertyType attackPropertyType = AttackPropertyType.None,
|
||||
float maxLifetime = 3f) : base(entityId, typeId)
|
||||
{
|
||||
Position = position;
|
||||
|
||||
_target = target;
|
||||
_damage = damage;
|
||||
_attackPayload = attackPayload?.Clone() ?? new AttackPayload();
|
||||
_speed = speed;
|
||||
_attackPropertyType = attackPropertyType;
|
||||
_maxLifetime = maxLifetime;
|
||||
}
|
||||
|
||||
@@ -38,12 +35,6 @@ namespace GeometryTD.Entity.EntityData
|
||||
set => _target = value;
|
||||
}
|
||||
|
||||
public int Damage
|
||||
{
|
||||
get => _damage;
|
||||
set => _damage = value;
|
||||
}
|
||||
|
||||
public float Speed
|
||||
{
|
||||
get => _speed;
|
||||
@@ -56,10 +47,10 @@ namespace GeometryTD.Entity.EntityData
|
||||
set => _maxLifetime = value;
|
||||
}
|
||||
|
||||
public AttackPropertyType AttackPropertyType
|
||||
public AttackPayload AttackPayload
|
||||
{
|
||||
get => _attackPropertyType;
|
||||
set => _attackPropertyType = value;
|
||||
get => _attackPayload;
|
||||
set => _attackPayload = value?.Clone() ?? new AttackPayload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user