45 lines
994 B
C#
45 lines
994 B
C#
using UnityEngine;
|
|
using UnityEngine.Audio;
|
|
|
|
public class AudioEventController : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private AudioMixerGroup audioMixerGroup;
|
|
|
|
public static RodsAudioEvents rodsAudiosEvents;
|
|
|
|
public static ReelsAudioEvents reelsAudiosEvents;
|
|
|
|
public static FishAudioEvents fishAudiosEvents;
|
|
|
|
public static PlayerAudioEvents playerAudiosEvents;
|
|
|
|
public static ResidenceAudioEvents residenceAudiosEvents;
|
|
|
|
public AudioMixerGroup AudioMixerGroup
|
|
{
|
|
get
|
|
{
|
|
return audioMixerGroup;
|
|
}
|
|
set
|
|
{
|
|
AudioMixerGroup = value;
|
|
}
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
rodsAudiosEvents = GetComponentInChildren<RodsAudioEvents>();
|
|
reelsAudiosEvents = GetComponentInChildren<ReelsAudioEvents>();
|
|
fishAudiosEvents = GetComponentInChildren<FishAudioEvents>();
|
|
playerAudiosEvents = GetComponentInChildren<PlayerAudioEvents>();
|
|
residenceAudiosEvents = GetComponentInChildren<ResidenceAudioEvents>();
|
|
}
|
|
|
|
private void Awake()
|
|
{
|
|
Object.DontDestroyOnLoad(base.gameObject);
|
|
}
|
|
}
|