Files
MobileShooter/Assets/Darkmatter/Code/Presentation/Enemies/Enemy.cs
2025-12-29 16:41:50 -08:00

23 lines
475 B
C#

using Darkmatter.Core;
using UnityEngine;
namespace Darkmatter.Presentation
{
public class Enemy : MonoBehaviour, IDamageable
{
public float health = 100f;
public void Die()
{
Debug.Log("Dead");
this.gameObject.SetActive(false);
}
public void TakeDamage(float damage)
{
health -= damage;
if (health <= 0) Die();
Debug.Log("Damage Taken");
}
}
}