Files
BH3/Assets/Scripts/Assembly-CSharp/MoleMole/AmbientSound.cs
2025-08-13 09:26:42 +08:00

28 lines
462 B
C#

using UnityEngine;
namespace MoleMole
{
public class AmbientSound : MonoBehaviour
{
public string enterEventName;
public string exitEventName;
private void Awake()
{
if (!string.IsNullOrEmpty(enterEventName))
{
Singleton<WwiseAudioManager>.Instance.Post(enterEventName);
}
}
private void OnDestroy()
{
if (!string.IsNullOrEmpty(exitEventName))
{
Singleton<WwiseAudioManager>.Instance.Post(exitEventName);
}
}
}
}