unity-atoms/Packages/Core/Runtime/Variables/ColliderVariable.cs

19 lines
706 B
C#
Raw Normal View History

using System;
using UnityEngine;
namespace UnityAtoms
{
2019-10-15 16:26:14 -04:00
/// <summary>
/// Variable of type `Collider`. Inherits from `AtomVariable&lt;Collider, ColliderEvent, ColliderColliderEvent, ColliderColliderFunction&gt;`.
2019-10-15 16:26:14 -04:00
/// </summary>
2019-10-14 10:51:54 -04:00
[EditorIcon("atom-icon-lush")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Collider", fileName = "ColliderVariable")]
public sealed class ColliderVariable : AtomVariable<Collider, ColliderEvent, ColliderColliderEvent, ColliderColliderFunction>
{
2020-02-22 20:22:39 -05:00
protected override bool ValueEquals(Collider other)
{
2020-02-22 20:22:39 -05:00
return (_value == null && other == null) || _value != null && other != null && _value == other;
}
}
}