30 lines
826 B
C#
30 lines
826 B
C#
using SLSUtilities.WwiseAssistance;
|
|
using UnityEngine;
|
|
using Event = AK.Wwise.Event;
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
{
|
|
public class AudioSubcontroller : SubcontrollerBase<CharacterBase>
|
|
{
|
|
public AudioContainer audioContainer;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
audioContainer ??= owner.GetComponent<AudioContainer>();
|
|
}
|
|
|
|
public void PlayFootStepSound(AnimationEvent animationEvent)
|
|
{
|
|
if (animationEvent.animatorClipInfo.weight > 0.5f)
|
|
{
|
|
AudioManager.Post(AK.EVENTS.FOOTSTEP, owner.bodyPartsSc.footPoint.gameObject);
|
|
}
|
|
}
|
|
|
|
public void PlayDashSound()
|
|
{
|
|
AudioManager.Post(AK.EVENTS.DASH, owner.gameObject);
|
|
}
|
|
}
|
|
} |