몬스터 스크립트 파일명 변경

This commit is contained in:
Mingu Kim
2025-02-04 23:50:07 +09:00
parent 6fb5752aa0
commit 8a66d841a8
3 changed files with 13 additions and 11 deletions

View File

@@ -5,24 +5,21 @@ using UnityEngine;
namespace TON
{
public class MonsterControl : MonoBehaviour
public class MonsterBase : MonoBehaviour, IDamage
{
public int id; // 적 고유 ID
public string name; // 적 이름
public int hp; // HP
public int damage; // 공격력
public int defense; // 방어력
public int speed = 2; // 이동속도
public string aiType; // AI 패턴?
public int dropItems; // 드롭 아이템 ID
public int eXperiencePoint; // 경험치?
const int speed = 2; // 이동속도
public Animator animator;
GameObject target;
private IDamage _damageImplementation;
// Start is called before the first frame update
void Start()
{
@@ -48,5 +45,10 @@ namespace TON
// animator.SetBool("Iidle", true);
animator.SetBool("Walk", true ); // 걷기 애니메이션
}
public void ApplyDamage(float damage)
{
_damageImplementation.ApplyDamage(damage);
}
}
}