using SLSUtilities.WwiseAssistance; using UnityEngine; using Event = AK.Wwise.Event; namespace Cielonos.MainGame.Characters { public class AudioSubcontroller : SubcontrollerBase { public AudioContainer audioContainer; public GameObject PlayPoint(Transform overridePoint) { return overridePoint != null ? overridePoint.gameObject : owner.gameObject; } public override void Initialize() { base.Initialize(); audioContainer ??= owner.GetComponent(); } public void PlayFootStepSound(AnimationEvent animationEvent) { if (animationEvent.animatorClipInfo.weight > 0.5f) { audioContainer.PlaySoundFX("FootStep", PlayPoint(owner.bodyPartsSc.footPoint)); } } public void PlayDashSound() { audioContainer.PlaySoundFX("Dash", PlayPoint(owner.bodyPartsSc.footPoint)); } } }