рефакторю управление игроком

This commit is contained in:
vladislove committed 2026-09-22 20:51:51 +03:00
1 parent 2746850727
commit f632508497
18 files changed
+1044 -66

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
using UnityEngine;
public class TargetDummy : MonoBehaviour, IDamageable
{
[SerializeField] private float health = 100f;
public void TakeDamage(float amount)
{
health -= amount;
Debug.Log($"Враг получил {amount} урона. Осталось HP: {health}");
if (health <= 0)
{
Destroy(gameObject);
}
}
}