Animator Get Bool#
Animation / Animator / Animator Get Bool Id
Description#
Compares the Get Bool method of Animator component to another value
Parameters#
| Name | Description |
|---|---|
| Animator | |
| Id |
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 Get Bool")]
[Category("Animation/Animator/Get Bool", "Id")]
[Description("Compares the Get Bool method of Animator component to another value")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Animator")]
[Parameter("Id")]
[Serializable]
public class GenConditionBool_Animator_CheckGetBool_1_IntId : Condition
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private GetInteger m_Id = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Get Bool");
string parameters = $"({this.m_Id})";
return $"{this.m_Animator} {method}";
}
protected override bool Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return false;
bool value = component.GetBool(
(int) this.m_Id.Get(args)
);
return value;
}
}
}