mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 00:14:37 +01:00
28 lines
462 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|