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

26 lines
604 B
C#
Raw Normal View History

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