using System; using GeometryTD.Definition; using UnityEngine; namespace GeometryTD.Entity.EntityData { [Serializable] 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; public BulletData( int entityId, int typeId, Vector3 position, Transform target, int damage, float speed, AttackPropertyType attackPropertyType = AttackPropertyType.None, float maxLifetime = 3f) : base(entityId, typeId) { Position = position; _target = target; _damage = damage; _speed = speed; _attackPropertyType = attackPropertyType; _maxLifetime = maxLifetime; } public Transform Target { get => _target; set => _target = value; } public int Damage { get => _damage; set => _damage = value; } public float Speed { get => _speed; set => _speed = value; } public float MaxLifetime { get => _maxLifetime; set => _maxLifetime = value; } public AttackPropertyType AttackPropertyType { get => _attackPropertyType; set => _attackPropertyType = value; } } }