Projext/Assets/Scripts/Obsession/DummyMonster.cs
2026-02-22 22:37:34 +09:00

21 lines
501 B
C#

using UnityEngine;
public class DummyMonster : MonoBehaviour, IDamageable
{
[SerializeField] private float hp = 20f;
public void TakeDamage(float amount)
{
hp -= amount;
Debug.Log($"[DummyMonster] 맞음! -{amount}, 남은HP={hp}");
if (hp <= 0)
{
Debug.Log("[DummyMonster] 사망! +5 런XP");
if (ObsessionSystem.instance != null)
ObsessionSystem.instance.AddRunXP(5);
Destroy(gameObject);
}
}
}