mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-23 08:38:23 -05:00
19 lines
523 B
C#
19 lines
523 B
C#
using System;
|
|
|
|
namespace UnityAtoms
|
|
{
|
|
[EditorIcon("atom-icon-lush")]
|
|
public abstract class EquatableAtomVariable<T, P, E1, E2, F> : AtomVariable<T, P, E1, E2, F>
|
|
where T : IEquatable<T>
|
|
where P : struct, IPair<T>
|
|
where E1 : AtomEvent<T>
|
|
where E2 : AtomEvent<P>
|
|
where F : AtomFunction<T, T>
|
|
{
|
|
protected override bool ValueEquals(T other)
|
|
{
|
|
return (_value == null && other == null) || (_value != null && _value.Equals(other));
|
|
}
|
|
}
|
|
}
|