mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
32 lines
650 B
C#
32 lines
650 B
C#
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItem("Animator", "Set Look At Weight", new CutsceneItemGenre[]
|
|
{
|
|
CutsceneItemGenre.ActorItem,
|
|
CutsceneItemGenre.MecanimItem
|
|
})]
|
|
public class SetLookAtWeightAnimatorEvent : CinemaActorEvent
|
|
{
|
|
public float Weight;
|
|
|
|
public float BodyWeight;
|
|
|
|
public float HeadWeight = 1f;
|
|
|
|
public float EyesWeight;
|
|
|
|
public float ClampWeight = 0.5f;
|
|
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
Animator component = actor.GetComponent<Animator>();
|
|
if (!(component == null))
|
|
{
|
|
component.SetLookAtWeight(Weight, BodyWeight, HeadWeight, EyesWeight, ClampWeight);
|
|
}
|
|
}
|
|
}
|
|
}
|