че та

This commit is contained in:
lapich committed 2026-03-21 01:16:00 +03:00
1 parent de6fdb1e47
commit 6e3d5ab9a2
7 files changed
+188

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
using UnityEngine;
public class Target : MonoBehaviour
{
public float health = 50f;
public void TakeDamage(float amount)
{
health -= amount;
if (health <= 0f)
{
Die();
}
}
void Die()
{
// For now, we'll just destroy the target object
Destroy(gameObject);
}
}