mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 10:26:02 -05:00
13 lines
405 B
C#
13 lines
405 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|