unity-atoms/Assets/UnityAtoms/Variables/FloatVariable.cs
2018-11-13 19:48:17 +01:00

18 lines
570 B
C#

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