mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-17 17:04:45 +01:00
69 lines
998 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|