Wind Zone Wind Pulse Frequency#
Miscellaneous / Wind Zone / Wind Zone Wind Pulse Frequency
Can Read
Can Write
Description#
The Wind Pulse Frequency property of the Wind Zone component
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
{
[Get]
[Set]
[Title("Wind Zone Wind Pulse Frequency")]
[Category("Miscellaneous/Wind Zone/Wind Pulse Frequency")]
[Description("The Wind Pulse Frequency property of the Wind Zone component")]
[Image(typeof(IconWind), ColorTheme.Type.Lime)]
[Keywords("Air, Blow")]
[Serializable]
public class GenTypeNumber_WindZone_WindPulseFrequency : TypeNumber
{
[SerializeField] private GetGameObject m_WindZone = new GetGameObject(
new GenTypeGameObject_WindZone()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_WindZone.GetPreview(source);
if (instance == null) return default;
WindZone component = instance.GetComponent<WindZone>();
return component != null ? component.windPulseFrequency : default;
}
public override double Get(Args args)
{
WindZone instance = this.m_WindZone.Get<WindZone>(args);
return instance != null
? instance.windPulseFrequency
: default;
}
public override void Set(double value, Args args)
{
WindZone component = this.m_WindZone.Get<WindZone>(args);
if (component != null) component.windPulseFrequency = (float) value;
}
public override string ToString()
{
return $"{this.m_WindZone} Wind Pulse Frequency";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}