Здоровье чутка изменено
This commit is contained in:
1 parent
653342d080
commit
4ecafef8ee
6 files changed
+27
-50
No files matched your search
@@ -15,13 +15,11 @@ namespace Code.Example.Platformer.Entity
|
||||
[SerializeField] protected SpriteRenderer spriteRenderer;
|
||||
[SerializeField] private Vector2 groundPoint;
|
||||
|
||||
private EntityHealth _health;
|
||||
private PlatformerEntityData _data;
|
||||
|
||||
public void SetData(PlatformerEntityData data)
|
||||
{
|
||||
_data = data;
|
||||
_health = new(data.maxHealth);
|
||||
}
|
||||
|
||||
protected bool onGround;
|
||||
@@ -51,7 +49,5 @@ namespace Code.Example.Platformer.Entity
|
||||
}
|
||||
|
||||
protected abstract void Move();
|
||||
|
||||
public virtual void GetDamage(int damage) => _health.GiveDamage(damage);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user