Animator Delta Position#
Animation / Animator / Animator Delta Position
Description#
Compares the Delta Position property of Animator component to another value
Parameters#
| Name | Description |
|---|---|
| Animator | |
| Value |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Animator Delta Position")]
[Category("Animation/Animator/Delta Position")]
[Description("Compares the Delta Position property of Animator component to another value")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Animator")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_Animator_CheckDeltaPosition : Condition
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private GetVector3 m_Value = new GetVector3();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Delta Position");
return $"{this.m_Animator} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return false;
return component.deltaPosition == (Vector3) this.m_Value.Get(args);
}
}
}