This commit is contained in:
lapich committed 2026-10-23 15:44:09 +03:00
1 parent 76b6566e46
commit 11d290d572
49 files changed
+2562 -587

No files matched your search

+6
View File
@@ -8,6 +8,9 @@ public class MutantHealth : MonoBehaviour
public bool IsDead => currentHealth <= 0;
public float CurrentHealth => currentHealth;
public System.Action<float, float> OnHealthChanged;
public System.Action OnDied;
private BlindMutantAI mutantAI;
void Awake()
@@ -23,6 +26,8 @@ public class MutantHealth : MonoBehaviour
currentHealth -= damage;
Debug.Log($"Мутант получил урон: {damage}! Осталось: {currentHealth}");
OnHealthChanged?.Invoke(currentHealth, maxHealth);
if (mutantAI != null && attacker != null)
{
mutantAI.OnDamagedByPlayer(attacker);
@@ -37,6 +42,7 @@ public class MutantHealth : MonoBehaviour
private void Die()
{
Debug.Log("МУТАНТ УМЕР!");
OnDied?.Invoke();
var anim = GetComponentInChildren<Animator>();
if (anim != null)
{