2020-03-02 02:26:06 +01:00
|
|
|
using System;
|
|
|
|
using UnityAtoms.BaseAtoms;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace UnityAtoms.BaseAtoms
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-03-09 00:37:52 +01:00
|
|
|
/// Reference of type `Collider`. Inherits from `AtomReference<Collider, ColliderPair, ColliderConstant, ColliderVariable, ColliderEvent, ColliderPairEvent, ColliderColliderFunction, ColliderVariableInstancer, AtomCollection, AtomList>`.
|
2020-03-02 02:26:06 +01:00
|
|
|
/// </summary>
|
|
|
|
[Serializable]
|
|
|
|
public sealed class ColliderReference : AtomReference<
|
|
|
|
Collider,
|
|
|
|
ColliderPair,
|
|
|
|
ColliderConstant,
|
|
|
|
ColliderVariable,
|
|
|
|
ColliderEvent,
|
|
|
|
ColliderPairEvent,
|
|
|
|
ColliderColliderFunction,
|
|
|
|
ColliderVariableInstancer,
|
|
|
|
AtomCollection,
|
|
|
|
AtomList>, IEquatable<ColliderReference>
|
|
|
|
{
|
|
|
|
public ColliderReference() : base() { }
|
|
|
|
public ColliderReference(Collider value) : base(value) { }
|
|
|
|
public bool Equals(ColliderReference other) { return base.Equals(other); }
|
|
|
|
protected override bool ValueEquals(Collider other)
|
|
|
|
{
|
2020-03-05 00:56:56 +01:00
|
|
|
return (this.Value == null && other == null) || this.Value != null && other != null && this.Value == other;
|
|
|
|
}
|
2020-03-02 02:26:06 +01:00
|
|
|
}
|
|
|
|
}
|