Files
BH3/Assets/Plugins/Assembly-CSharp-firstpass/CinemaDirector/CinemaShot.cs
2025-08-13 09:26:42 +08:00

69 lines
998 B
C#

using UnityEngine;
namespace CinemaDirector
{
[CutsceneItem("Shots", "Shot", new CutsceneItemGenre[] { CutsceneItemGenre.CameraShot })]
public class CinemaShot : CinemaGlobalAction
{
public Camera shotCamera;
private bool cachedState;
public float CutTime
{
get
{
return base.Firetime;
}
set
{
base.Firetime = value;
}
}
public float ShotLength
{
get
{
return base.Duration;
}
set
{
base.Duration = value;
}
}
public override void Initialize()
{
if (shotCamera != null)
{
cachedState = shotCamera.gameObject.activeInHierarchy;
}
}
public override void Trigger()
{
if (shotCamera != null)
{
shotCamera.gameObject.SetActive(true);
}
}
public override void End()
{
if (shotCamera != null)
{
shotCamera.gameObject.SetActive(false);
}
}
public override void Stop()
{
if (shotCamera != null)
{
shotCamera.gameObject.SetActive(cachedState);
}
}
}
}