FiE-Game/Assets/Cinema Director/Cutscene Items/Actor Items/AudioSource/PauseAudioEvent.cs
2023-07-27 00:47:00 +05:00

23 lines
No EOL
555 B
C#

using UnityEngine;
using System.Collections;
namespace CinemaDirector
{
[CutsceneItemAttribute("Audio Source", "Pause Audio", CutsceneItemGenre.ActorItem)]
public class PauseAudioEvent : CinemaActorEvent
{
public override void Trigger(GameObject actor)
{
if (actor != null)
{
AudioSource audio = actor.GetComponent<AudioSource>();
if (!audio)
{
return;
}
audio.Pause();
}
}
}
}