1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-18 10:26:02 -05:00
OpenDiablo2/OpenDiablo2.Common/Extensions/MobManagerExtensions.cs

13 lines
405 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
using OpenDiablo2.Common.Models.Mobs;
namespace OpenDiablo2.Common.Extensions
{
public static class MobManagerExtensions
{
public static IEnumerable<MobState> FindInRadius(this IEnumerable<MobState> mobs, float centerx, float centery, float radius)
=> mobs.Where(x => x.GetDistance(centerx, centery) <= radius);
}
}