for (int dx = -radius; dx <= radius; dx++)
{
for (int dy = -radius; dy <= radius; dy++)
{
Vector2 loc = currentLocation + new Vector2(dx, dy);
if (location.Objects.ContainsKey(loc) && location.Objects[loc] is T t)
{
list.Add(t);
}
}
}
for (int dx = -radius; dx <= radius; dx++)
{
for (int dy = -radius; dy <= radius; dy++)
{
Vector2 loc = currentLocation + new Vector2(dx, dy);
if (location.Objects.ContainsKey(loc) && location.Objects[loc] is T t)
{
list.Add(t);
}
}
}