unity-atoms/Source/Variables/FloatVariable.cs
2019-09-25 21:05:06 +02:00

19 lines
582 B
C#

using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Float", fileName = "FloatVariable")]
public sealed class FloatVariable : EquatableAtomVariable<float, FloatEvent, FloatFloatEvent>, IWithApplyChange<float, FloatEvent, FloatFloatEvent>
{
public bool ApplyChange(float amount)
{
return SetValue(Value + amount);
}
public bool ApplyChange(EquatableAtomVariable<float, FloatEvent, FloatFloatEvent> amount)
{
return SetValue(Value + amount.Value);
}
}
}