18 lines
569 B
C#
Raw Normal View History

2018-10-30 20:05:06 +01:00
using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "UnityAtoms/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);
}
}
}