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

22 lines
643 B
C#
Raw Normal View History

2023-07-26 21:47:00 +02:00
// Cinema Suite
using UnityEngine;
namespace CinemaDirector
{
/// <summary>
/// Event that captures a screenshot when triggered.
/// </summary>
[CutsceneItem("Utility", "Storyboard", CutsceneItemGenre.GlobalItem)]
public class StoryboardEvent : CinemaGlobalEvent
{
public static int Count = 0; // Count how many screenshots have been captured.
/// <summary>
/// Capture screenshot on trigger.
/// </summary>
public override void Trigger()
{
Application.CaptureScreenshot(string.Format(@"Assets\{0}{1}.png", this.gameObject.name, Count++));
}
}
}