mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-26 15:27:59 +01:00
26 lines
No EOL
626 B
C#
26 lines
No EOL
626 B
C#
// Cinema Suite
|
|
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
/// <summary>
|
|
/// Event for loading a new level
|
|
/// </summary>
|
|
[CutsceneItem("Utility", "Load Level", CutsceneItemGenre.GlobalItem)]
|
|
public class LoadLevelEvent : CinemaGlobalEvent
|
|
{
|
|
// The index of the level to be loaded.
|
|
public int Level = 0;
|
|
|
|
/// <summary>
|
|
/// Trigger the level load. Only in Runtime.
|
|
/// </summary>
|
|
public override void Trigger()
|
|
{
|
|
if (Application.isPlaying)
|
|
{
|
|
Application.LoadLevel(Level);
|
|
}
|
|
}
|
|
}
|
|
} |