using UnityEngine;
namespace UnityAtoms
{
///
/// Variable of type `int`. Inherits from `EquatableAtomVariable<int, IntEvent, IntIntEvent>`.
///
[EditorIcon("atom-icon-lush")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Int", fileName = "IntVariable")]
public sealed class IntVariable : EquatableAtomVariable, IWithApplyChange
{
public bool ApplyChange(int amount)
{
return SetValue(Value + amount);
}
public bool ApplyChange(EquatableAtomVariable amount)
{
return SetValue(Value + amount.Value);
}
}
}