예제 #1
0
 internal static float DistanceCached(this GameObject from, Vector2 target)
 {
     return(MenuManager.IsCacheEnabled
         ? CachedDistance.Get(from.Position, target.To3D())
         : from.Distance(target));
 }
예제 #2
0
 internal static float DistanceCached(this GameObject from, GameObject target)
 {
     return(MenuManager.IsCacheEnabled ? CachedDistance.Get(from, target) : from.Distance(target));
 }
예제 #3
0
 internal static float DistanceCached(this Vector3 from, GameObject target)
 {
     return(MenuManager.IsCacheEnabled ? CachedDistance.Get(@from, target.Position) : @from.Distance(target));
 }
예제 #4
0
 internal static float DistanceCached(this Vector3 from, Vector3 target)
 {
     return(MenuManager.IsCacheEnabled ? CachedDistance.Get(from, target) : from.Distance(target));
 }
예제 #5
0
 internal static float DistanceCached(this Vector2 from, Vector2 target)
 {
     return(MenuManager.IsCacheEnabled ? CachedDistance.Get(@from.To3D(), target.To3D()) : @from.Distance(target));
 }