r2mods/ilspy_dump/ror2_csproj/ForcePose.cs

26 lines
426 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
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);
}
}
}