mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
20 lines
523 B
C#
20 lines
523 B
C#
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class StateRebindAttachPoint : StateMachineBehaviour
|
|
{
|
|
[Header("Rebind AttachPoint to another attach point")]
|
|
public string AttachPoint;
|
|
|
|
[Header("Other Attach Point")]
|
|
public string OtherAttachPoint;
|
|
|
|
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
|
{
|
|
BaseMonoAnimatorEntity component = animator.GetComponent<BaseMonoAnimatorEntity>();
|
|
component.RebindAttachPoint(AttachPoint, OtherAttachPoint);
|
|
}
|
|
}
|
|
}
|