internal static float DistanceCached(this GameObject from, Vector2 target) { return(MenuManager.IsCacheEnabled ? CachedDistance.Get(from.Position, target.To3D()) : from.Distance(target)); }
internal static float DistanceCached(this GameObject from, GameObject target) { return(MenuManager.IsCacheEnabled ? CachedDistance.Get(from, target) : from.Distance(target)); }
internal static float DistanceCached(this Vector3 from, GameObject target) { return(MenuManager.IsCacheEnabled ? CachedDistance.Get(@from, target.Position) : @from.Distance(target)); }
internal static float DistanceCached(this Vector3 from, Vector3 target) { return(MenuManager.IsCacheEnabled ? CachedDistance.Get(from, target) : from.Distance(target)); }
internal static float DistanceCached(this Vector2 from, Vector2 target) { return(MenuManager.IsCacheEnabled ? CachedDistance.Get(@from.To3D(), target.To3D()) : @from.Distance(target)); }