Made apple audio sources use OnManagedAwake
This commit is contained in:
@@ -4,8 +4,10 @@ using System;
|
||||
using System.Diagnostics.Tracing;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using Core;
|
||||
using Core.Lifecycle;
|
||||
|
||||
public class BushAudioController : MonoBehaviour
|
||||
public class BushAudioController : ManagedBehaviour
|
||||
{
|
||||
private IAudioEventSource _eventSource;
|
||||
public AppleAudioSource VOPlayer;
|
||||
@@ -20,7 +22,7 @@ public class BushAudioController : MonoBehaviour
|
||||
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
protected override void OnManagedAwake()
|
||||
{
|
||||
_eventSource = VOPlayer.audioSource.RequestEventHandlers();
|
||||
_eventSource.AudioStopped += PlayBirdCounter;
|
||||
|
||||
Reference in New Issue
Block a user