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

26 lines
No EOL
604 B
C#

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