캐릭터 dead 모션 연결
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74387cf4b85c95e4faa62256886c64d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user