몬스터 공격시 캐릭터 데미지 대상 지정 및 몬스터 피격 시 HP바 감소

This commit is contained in:
Mingu Kim
2025-02-28 02:15:32 +09:00
parent b96aac99f7
commit 5e893a029f
7 changed files with 750 additions and 93 deletions

View File

@@ -7,6 +7,11 @@ namespace TON
[SerializeField]
private MonsterBase _monsterBase;
public void SetMonsterBase(MonsterBase monsterBase)
{
_monsterBase = monsterBase;
}
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Player"))