unity-atoms/Packages/Core/Runtime/Variables/ColliderVariable.cs
2020-02-23 02:22:39 +01:00

19 lines
706 B
C#

using System;
using UnityEngine;
namespace UnityAtoms
{
/// <summary>
/// Variable of type `Collider`. Inherits from `AtomVariable&lt;Collider, ColliderEvent, ColliderColliderEvent, ColliderColliderFunction&gt;`.
/// </summary>
[EditorIcon("atom-icon-lush")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Collider", fileName = "ColliderVariable")]
public sealed class ColliderVariable : AtomVariable<Collider, ColliderEvent, ColliderColliderEvent, ColliderColliderFunction>
{
protected override bool ValueEquals(Collider other)
{
return (_value == null && other == null) || _value != null && other != null && _value == other;
}
}
}