r2mods/ilspy_dump/ror2_csproj/ForcePose.cs

26 lines
426 B
C#

using UnityEngine;
[RequireComponent(typeof(Animator))]
[ExecuteInEditMode]
public class ForcePose : MonoBehaviour
{
[Tooltip("The animation clip to force.")]
public AnimationClip clip;
[Tooltip("The moment in the cycle to force.")]
[Range(0f, 1f)]
public float cycle;
private void Start()
{
}
private void Update()
{
if ((bool)clip)
{
clip.SampleAnimation(base.gameObject, cycle * clip.length);
}
}
}