crown setters make crown appear

This commit is contained in:
Crizomb 2025-01-28 12:16:59 +01:00
parent e51417a4e5
commit 2ad6cc9bdb
3 changed files with 23 additions and 2 deletions

View file

@ -12,7 +12,20 @@ public abstract class AbstractUnit : MonoBehaviour
{
public float price;
[field: SerializeField] public bool IsTeamA { get; private set; }
[field: SerializeField] public bool IsQueen { get; set; }
[field: SerializeField]
protected bool _isQueen;
public virtual bool IsQueen
{
get => _isQueen;
set => SetQueen(value);
}
protected virtual void SetQueen(bool isQueen)
{
_isQueen = isQueen;
}
public abstract void TakeDamage(float damage);
public abstract void Heal(float heal);