Merge branch 'main' of https://github.com/Crizomb/ProjetAMJV_CR
This commit is contained in:
commit
fd649c831c
3 changed files with 23 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -19,7 +19,11 @@ public class MinecraftUnit : AbstractUnit
|
|||
|
||||
|
||||
|
||||
|
||||
protected override void SetQueen(bool isQueen)
|
||||
{
|
||||
_isQueen = isQueen;
|
||||
transform.Find("Crown").gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
new void Awake()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue