Area Effector 2D Use Global Angle#
Physics 2D / Effectors / Area Effector 2D / Area Effector 2D Use Global Angle
Description#
Compares the Use Global Angle property of Area Effector 2D component to another value
Parameters#
| Name | Description |
|---|---|
| Area Effector 2D |
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("Area Effector 2D Use Global Angle")]
[Category("Physics 2D/Effectors/Area Effector 2D/Use Global Angle")]
[Description("Compares the Use Global Angle property of Area Effector 2D component to another value")]
[Image(typeof(IconAreaEffector), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Parameter("Area Effector 2D")]
[Serializable]
public class GenConditionBool_AreaEffector2D_CheckUseGlobalAngle : Condition
{
[SerializeField] private GetGameObject m_AreaEffector2D = new GetGameObject(
new GenTypeGameObject_AreaEffector2D()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Use Global Angle");
return $"{this.m_AreaEffector2D} {member}";
}
protected override bool Run(Args args)
{
AreaEffector2D component = this.m_AreaEffector2D.Get<AreaEffector2D>(args);
if (component == null) return false;
return component.useGlobalAngle;
}
}
}