FIxed annoying compiler error
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using AudioSourceEvents;
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class NarratorVO : AudioSourceObserver
|
||||
public class NarratorVO : MonoBehaviour
|
||||
{
|
||||
public AudioSource narratorAudioSource;
|
||||
public AudioResource firstNarration;
|
||||
public UnityEvent narrationFinished;
|
||||
|
||||
private IAudioEventSource _eventSource;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
@@ -20,8 +18,6 @@ public class NarratorVO : AudioSourceObserver
|
||||
|
||||
void PlayNarrationAudio()
|
||||
{
|
||||
_eventSource = narratorAudioSource.RequestEventHandlers();
|
||||
_eventSource.AudioStopped += NarrationFinished;
|
||||
|
||||
narratorAudioSource.resource = firstNarration;
|
||||
narratorAudioSource.Play();
|
||||
|
||||
Reference in New Issue
Block a user