Beyond_Beyaan.EmpireManager.GetFleetsWithinArea C# (CSharp) Метод

GetFleetsWithinArea() публичный Метод

public GetFleetsWithinArea ( float left, float top, float width, float height ) : List
left float
top float
width float
height float
Результат List
        public List<Fleet> GetFleetsWithinArea(float left, float top, float width, float height)
        {
            List<Fleet> fleets = new List<Fleet>();
            foreach (Empire empire in _empires)
            {
                foreach (Fleet fleet in empire.FleetManager.GetFleets())
                {
                    if (empire != _empires[0] && !fleet.VisibleToWhichEmpires.Contains(_empires[0]))
                    {
                        continue;
                    }
                    if (fleet.GalaxyX + 16 < left || fleet.GalaxyY + 16 < top || fleet.GalaxyX - 16 > left + width || fleet.GalaxyY - 16 > top + height)
                    {
                        continue;
                    }
                    fleets.Add(fleet);
                }
            }
            return fleets;
        }