diff --git a/Assets/Scripts/AbstractCharacter.cs b/Assets/Scripts/AbstractCharacter.cs index 5e9fb91..3c790cc 100644 --- a/Assets/Scripts/AbstractCharacter.cs +++ b/Assets/Scripts/AbstractCharacter.cs @@ -15,22 +15,22 @@ public abstract class AbstractCharacter : MonoBehaviour // Characteristics and status of a character // // Speed in m/s - [SerializeField] protected float _maxSpeed; + [SerializeField] protected float _maxSpeed = 10; public float MaxSpeed { get { return _maxSpeed; } set { _maxSpeed = value; } } - [SerializeField] protected int _maxHealth; + [SerializeField] protected int _maxHealth = 1; public int MaxHealth => _maxHealth; public int CurrentHealth { get; set; } - [SerializeField] protected float _maxEnergy; + [SerializeField] protected float _maxEnergy = 100; public float MaxEnergy => _maxEnergy; public float CurrentEnergy { get; set; } // Energy gained back per second - [SerializeField] private float _energyRegen; + [SerializeField] private float _energyRegen = 20; public float EnergyRegen { get { return _energyRegen; } @@ -44,12 +44,8 @@ public abstract class AbstractCharacter : MonoBehaviour // Start is called before the first frame update void Start() { - MaxSpeed = 10; - _maxHealth = 1; CurrentHealth = MaxHealth; - _maxEnergy = 100; CurrentEnergy = MaxEnergy; - EnergyRegen = 20; _mover = GetComponentInParent(); _shooter = GetComponentInParent();