Beyond_Beyaan.Galaxy.GetStarsInArea C# (CSharp) Метод

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

Get all stars in the area for drawing purposes
public GetStarsInArea ( float left, float top, float width, float height ) : List
left float
top float
width float
height float
Результат List
        public List<StarSystem> GetStarsInArea(float left, float top, float width, float height)
        {
            List<StarSystem> starsInArea = new List<StarSystem>();

            foreach (StarSystem star in starSystems)
            {
                if (star.X + (star.Size * 16) < left || star.Y + (star.Size * 16) < top || star.X - (star.Size * 16) > left + width || star.Y - (star.Size * 16) > top + height)
                {
                    continue;
                }
                starsInArea.Add(star);
            }
            return starsInArea;
        }