using System.Collections; using System.Collections.Generic; using DarkTonic.MasterAudio; using UnityEngine; using Valheim; public class PetPlaySoundMachine : StateMachineBehaviour { [SoundGroup] public string dieSound; public bool isStop = true; public bool isWait = false; public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { base.OnStateEnter(animator, stateInfo, layerIndex); if(isStop) MasterAudio.StopAllSoundsOfTransform(animator.transform); if(dieSound!="") MasterAudio.PlaySound3DAtTransform(dieSound, animator.transform); } }