25 lines
538 B
C#
25 lines
538 B
C#
using FMODUnity;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AgentManager : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private void OnEnable()
|
|
{
|
|
CollisionDetection.m_PlaySoundOnContact += PlayOneShot;
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
CollisionDetection.m_PlaySoundOnContact -= PlayOneShot;
|
|
}
|
|
|
|
private void PlayOneShot(GameObject obj, float force, EventReference sound)
|
|
{
|
|
AudioManager.instance.PlayOneShotAttached(sound, obj, force);
|
|
}
|
|
|
|
}
|