using System; using System.Collections.Generic; using Mono.Event; using Script; using Sirenix.OdinInspector; using UnityEngine; namespace UnityTest.ZXL { public class AudioLogicManager : SerializedMonoBehaviour { // [ShowInInspector] private Dictionary dictionary = new Dictionary(); private void Awake() { EventManager.Instance.Subscribe(AudioEventArgs.EventId, AudioEvent); } private void OnDestroy() { EventManager.Instance.Unsubscribe(AudioEventArgs.EventId, AudioEvent); } private void AudioEvent(object sender, GameEventArgs e) { var args = e as AudioEventArgs; var str = $"6-4/{args.audioName}"; AudioManager.Instance.PlayMainSounds(str); } } }