FiE-Game/Assets/Cinema Director/Cutscene Items/Global Items/Cutscene/StopCutscene.cs
2023-07-27 00:47:00 +05:00

26 lines
No EOL
631 B
C#

// Cinema Suite
using UnityEngine;
namespace CinemaDirector
{
/// <summary>
/// Stop a given Cutscene from playing.
/// </summary>
[CutsceneItem("Cutscene", "Stop Cutscene", CutsceneItemGenre.GlobalItem)]
public class StopCutscene : CinemaGlobalEvent
{
// The cutscene to be stopped.
public Cutscene cutscene;
/// <summary>
/// Trigger this event and stop the given Cutscene from playing.
/// </summary>
public override void Trigger()
{
if (cutscene != null)
{
cutscene.Stop();
}
}
}
}