몬스터 스크립트 파일명 변경
This commit is contained in:
@@ -147,7 +147,7 @@ TilemapRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_ChunkSize: {x: 32, y: 32, z: 32}
|
||||
m_ChunkCullingBounds: {x: 1, y: 1, z: 0}
|
||||
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
|
||||
m_MaxChunkCount: 16
|
||||
m_MaxFrameAge: 16
|
||||
m_SortOrder: 0
|
||||
@@ -195,11 +195,11 @@ Grid:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8286671012791683770}
|
||||
m_Enabled: 1
|
||||
m_CellSize: {x: 3, y: 3, z: 0}
|
||||
m_CellSize: {x: 1, y: 1, z: 0}
|
||||
m_CellGap: {x: 0, y: 0, z: 0}
|
||||
m_CellLayout: 0
|
||||
m_CellSwizzle: 0
|
||||
--- !u!114 &3290863019711079829
|
||||
--- !u!114 &4559044558228241293
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user