mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
21 lines
418 B
C#
21 lines
418 B
C#
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItem("Audio Source", "Stop Audio", new CutsceneItemGenre[] { CutsceneItemGenre.ActorItem })]
|
|
public class StopAudioEvent : CinemaActorEvent
|
|
{
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
if (actor != null)
|
|
{
|
|
AudioSource component = actor.GetComponent<AudioSource>();
|
|
if ((bool)component)
|
|
{
|
|
component.Stop();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|