mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
26 lines
510 B
C#
26 lines
510 B
C#
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItem("Animator", "Set Layer Weight", new CutsceneItemGenre[]
|
|
{
|
|
CutsceneItemGenre.ActorItem,
|
|
CutsceneItemGenre.MecanimItem
|
|
})]
|
|
public class SetLayerWeightAnimatorEvent : CinemaActorEvent
|
|
{
|
|
public int LayerIndex;
|
|
|
|
public float Weight;
|
|
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
Animator component = actor.GetComponent<Animator>();
|
|
if (!(component == null))
|
|
{
|
|
component.SetLayerWeight(LayerIndex, Weight);
|
|
}
|
|
}
|
|
}
|
|
}
|