mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-28 08:07:59 +01:00
23 lines
No EOL
552 B
C#
23 lines
No EOL
552 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItemAttribute("Audio Source", "Stop Audio", CutsceneItemGenre.ActorItem)]
|
|
public class StopAudioEvent : CinemaActorEvent
|
|
{
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
if (actor != null)
|
|
{
|
|
AudioSource audio = actor.GetComponent<AudioSource>();
|
|
if (!audio)
|
|
{
|
|
return;
|
|
}
|
|
|
|
audio.Stop();
|
|
}
|
|
}
|
|
}
|
|
} |