Practice_Unity/Assets/Scripts/Controllers/KnightController.cs
Seonkyu.kim 7d8657752e 작업
1. 조이스틱 동작
  1.1. 플레이어 컨트롤러 연동
  1.2. 자연스러운 방향 전환 추가
2. 베이스씬 작업
  2.1. 게임 씬 추가
    2.2. 조이스틱 UI 추가

Todo
1. 카메라를 캐릭터한테 붙이기
2. 다른 UI 작업도 추가하기
3. 몬스터 AI 작업도 할 수 있으면 해보기
2025-09-22 17:48:06 +09:00

57 lines
904 B
C#

using System;
using Animation;
using UnityEngine;
using Object = System.Object;
public class KnightController : MonoBehaviour
{
private AnimatorManager<AnimatorParam> _mAnimator;
enum MotionStat
{
Idle,
Walk,
Run,
Attack,
Hit,
Jump
}
enum AnimatorParam
{
speed,
atk_speed,
attack,
run,
}
MotionStat currentStat = MotionStat.Idle;
void Start()
{
_mAnimator = new AnimatorManager<AnimatorParam>(GetComponent<Animator>());
_mAnimator.SetValue(AnimatorParam.attack, true);
}
void Update()
{
}
public void Hit()
{
_mAnimator.SetValue(AnimatorParam.attack, false);
Debug.Log("Knight Hit!");
}
public void FootR()
{
}
public void FootL()
{
}
}