FiE-Game/Assets/Cinema Director/Cutscene Items/Global Items/Cutscene/StopCutscene.cs

26 lines
631 B
C#
Raw Normal View History

2023-07-26 21:47:00 +02:00
// 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();
}
}
}
}