캐릭터 dead 모션 연결

This commit is contained in:
aube.lee
2025-02-02 16:37:22 +09:00
parent db7ae8d43d
commit 6792d21e5b
6 changed files with 441 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TON
{
public class DeadStateMachine : StateMachineBehaviour
{
public override void OnStateMachineEnter(Animator animator, int stateMachinePathHash)
{
base.OnStateMachineEnter(animator, stateMachinePathHash);
}
public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
if (animator.TryGetComponent(out CharacterBase character))
{
character.Dead();
}
}
}
}