14 lines
324 B
C#
14 lines
324 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PlaySoundOnAnimate : StateMachineBehaviour
|
|
{
|
|
|
|
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
|
|
{
|
|
animator.gameObject.GetComponent<AudioSource>().Play();
|
|
}
|
|
|
|
}
|