mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-28 08:07:59 +01:00
31 lines
No EOL
838 B
C#
31 lines
No EOL
838 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItemAttribute("Animation", "Cross Fade Animation", CutsceneItemGenre.ActorItem)]
|
|
public class CrossFadeAnimationEvent : CinemaActorEvent
|
|
{
|
|
public string Animation = string.Empty;
|
|
public float TargetWeight = 1f;
|
|
public PlayMode PlayMode = PlayMode.StopSameLayer;
|
|
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
if (actor != null)
|
|
{
|
|
Animation animation = actor.GetComponent<Animation>();
|
|
if (!animation)
|
|
{
|
|
return;
|
|
}
|
|
|
|
animation.CrossFade(Animation, TargetWeight, PlayMode);
|
|
}
|
|
}
|
|
|
|
public override void Reverse(GameObject actor)
|
|
{
|
|
}
|
|
}
|
|
} |