You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
648 B
26 lines
648 B
using System; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
namespace UnityTest |
|
{ |
|
public class TransformComparer : ComparerBaseGeneric<Transform> |
|
{ |
|
public enum CompareType { Equals, NotEquals } |
|
|
|
public CompareType compareType; |
|
|
|
protected override bool Compare(Transform a, Transform b) |
|
{ |
|
if (compareType == CompareType.Equals) |
|
{ |
|
return a.position == b.position; |
|
} |
|
if (compareType == CompareType.NotEquals) |
|
{ |
|
return a.position != b.position; |
|
} |
|
throw new Exception(); |
|
} |
|
} |
|
}
|
|
|