mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-25 17:38:24 -05:00
19 lines
736 B
C#
19 lines
736 B
C#
|
using System;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace UnityAtoms.BaseAtoms
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Variable of type `Collider`. Inherits from `AtomVariable<Collider, ColliderPair, ColliderEvent, ColliderPairEvent, ColliderColliderFunction>`.
|
||
|
/// </summary>
|
||
|
[EditorIcon("atom-icon-lush")]
|
||
|
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Collider", fileName = "ColliderVariable")]
|
||
|
public sealed class ColliderVariable : AtomVariable<Collider, ColliderPair, ColliderEvent, ColliderPairEvent, ColliderColliderFunction>
|
||
|
{
|
||
|
protected override bool ValueEquals(Collider other)
|
||
|
{
|
||
|
return (_value == null && other == null) || _value != null && other != null && _value == other;
|
||
|
}
|
||
|
}
|
||
|
}
|