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