mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 00:58:59 -05:00
28 lines
1020 B
C#
28 lines
1020 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace UnityAtoms
|
|
{
|
|
/// <summary>
|
|
/// Reference of type `Collider`. Inherits from `AtomReference<Collider, ColliderConstant, ColliderVariable, ColliderEvent, ColliderColliderEvent, ColliderColliderFunction, ColliderVariableInstancer>`.
|
|
/// </summary>
|
|
[Serializable]
|
|
public sealed class ColliderReference : AtomReference<
|
|
Collider,
|
|
ColliderConstant,
|
|
ColliderVariable,
|
|
ColliderEvent,
|
|
ColliderColliderEvent,
|
|
ColliderColliderFunction,
|
|
ColliderVariableInstancer>, 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)
|
|
{
|
|
return (this.Value == null && other == null) || this.Value != null && other != null && this.Value == other;
|
|
}
|
|
}
|
|
}
|