40 lines
892 B
C#
40 lines
892 B
C#
using System;
|
|
using GeometryTD.Definition;
|
|
using UnityEngine;
|
|
|
|
namespace GeometryTD.Entity.EntityData
|
|
{
|
|
[Serializable]
|
|
public class PlayerData : EntityDataBase
|
|
{
|
|
[SerializeField] private CampType _camp = CampType.Player;
|
|
|
|
[SerializeField] private int _maxHealth = 0;
|
|
|
|
[SerializeField] private float _speed = 0;
|
|
|
|
public PlayerData(int entityId, int typeId, int maxHp, float speed) : base(entityId, typeId)
|
|
{
|
|
_maxHealth = maxHp;
|
|
_speed = speed;
|
|
}
|
|
|
|
public CampType Camp
|
|
{
|
|
get => _camp;
|
|
set => _camp = value;
|
|
}
|
|
|
|
public int MaxHealth
|
|
{
|
|
get => _maxHealth;
|
|
set => _maxHealth = value;
|
|
}
|
|
|
|
public float Speed
|
|
{
|
|
get => _speed;
|
|
set => _speed = value;
|
|
}
|
|
}
|
|
} |