From 7e81853eeda277e046507d9087d4478ec4645fb1 Mon Sep 17 00:00:00 2001 From: Mingu Kim Date: Mon, 3 Feb 2025 23:59:23 +0900 Subject: [PATCH] =?UTF-8?q?Monstercontrol=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 데이터테이블 기반 기본 값 추가, 애니메이션 수정 --- .../Personal Scenes/dev_mingu/Ingame.unity | 4 ++++ .../Gameton/Scripts/Monster/MonsterControl.cs | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Gameton-06/Assets/Gameton/Scenes/Personal Scenes/dev_mingu/Ingame.unity b/Gameton-06/Assets/Gameton/Scenes/Personal Scenes/dev_mingu/Ingame.unity index 1210ff77..1ff2dea3 100644 --- a/Gameton-06/Assets/Gameton/Scenes/Personal Scenes/dev_mingu/Ingame.unity +++ b/Gameton-06/Assets/Gameton/Scenes/Personal Scenes/dev_mingu/Ingame.unity @@ -12101,6 +12101,10 @@ PrefabInstance: propertyPath: m_Name value: 1_Alternative_Colour_Cat_Idle objectReference: {fileID: 0} + - target: {fileID: -2253911629886400664, guid: 06e11f99937f3f940bcf4f4bbb0a9fad, type: 3} + propertyPath: m_TagString + value: Player + objectReference: {fileID: 0} - target: {fileID: 7878350319992209165, guid: 06e11f99937f3f940bcf4f4bbb0a9fad, type: 3} propertyPath: m_LocalScale.x value: 10 diff --git a/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterControl.cs b/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterControl.cs index 109c6240..096d6e4d 100644 --- a/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterControl.cs +++ b/Gameton-06/Assets/Gameton/Scripts/Monster/MonsterControl.cs @@ -7,7 +7,19 @@ namespace TON { public class MonsterControl : MonoBehaviour { - public float speed = 2; + 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; // 경험치? + + + + public Animator animator; GameObject target; @@ -15,6 +27,9 @@ namespace TON void Start() { target = GameObject.FindGameObjectWithTag("Player"); + animator = GetComponent(); + + } // Update is called once per frame @@ -30,6 +45,8 @@ namespace TON // 방향 * 속도 * 시간간격 transform.Translate(direction.normalized * speed * Time.deltaTime); + // animator.SetBool("Iidle", true); + animator.SetBool("Walk", true ); // 걷기 애니메이션 } } }