mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
32 lines
672 B
C#
32 lines
672 B
C#
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItem("Animation", "Sample Animation", new CutsceneItemGenre[] { CutsceneItemGenre.ActorItem })]
|
|
public class SampleAnimationEvent : CinemaActorEvent
|
|
{
|
|
public string Animation = string.Empty;
|
|
|
|
public float Time;
|
|
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
if (actor != null)
|
|
{
|
|
Animation component = actor.GetComponent<Animation>();
|
|
if ((bool)component)
|
|
{
|
|
component[Animation].time = Time;
|
|
component[Animation].enabled = true;
|
|
component.Sample();
|
|
component[Animation].enabled = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void Reverse(GameObject actor)
|
|
{
|
|
}
|
|
}
|
|
}
|