r2mods/ilspy_dump/ror2_csproj/RoR2.WwiseUtils/RtpcSetBehavior.cs

35 lines
521 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2.WwiseUtils;
public class RtpcSetBehavior : MonoBehaviour
{
[SerializeField]
private string valueName;
[SerializeField]
private float initialValue;
private RtpcSetter rtpcSetter;
public float value
{
get
{
return rtpcSetter.value;
}
set
{
rtpcSetter.value = value;
rtpcSetter.FlushIfChanged();
}
}
private void Start()
{
rtpcSetter = new RtpcSetter(valueName, base.gameObject);
rtpcSetter.value = initialValue;
rtpcSetter.FlushIfChanged();
}
}