2019-09-29 18:02:54 -04:00
|
|
|
using System;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace UnityAtoms
|
|
|
|
{
|
2019-10-15 16:26:14 -04:00
|
|
|
/// <summary>
|
|
|
|
/// Variable of type `Collider`. Inherits from `AtomVariable<Collider, ColliderEvent, ColliderColliderEvent>`.
|
|
|
|
/// </summary>
|
2019-10-14 10:51:54 -04:00
|
|
|
[EditorIcon("atom-icon-lush")]
|
2019-09-29 18:02:54 -04:00
|
|
|
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Collider", fileName = "ColliderVariable")]
|
|
|
|
public sealed class ColliderVariable : AtomVariable<Collider, ColliderEvent, ColliderColliderEvent>
|
|
|
|
{
|
|
|
|
protected override bool AreEqual(Collider first, Collider second)
|
|
|
|
{
|
|
|
|
return (first == null && second == null) || first != null && second != null && first == second;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|