Example #1
0
        public BuildingSelection GetSelectedBuildings()
        {
            BuildingSelection selection = new BuildingSelection();

            for (int i = 0; i < this.buildings.Count(); i++)
            {
                Building b = this.buildings.ElementAt(i);
                if (b.selected)
                {
                    selection.buildings.AddLast(b);
                }
            }

            return selection;
        }
Example #2
0
        public BuildingSelection GetBuildings()
        {
            BuildingSelection selection = new BuildingSelection(new CustomArrayList<Building>());

            for (int i = 0; i < this.buildings.Count(); i++)
            {
                Building b = this.buildings.ElementAt(i);
                if (this.selectBox.GetRectangle().Contains((int)b.x, (int)b.y))
                {
                    selection.buildings.AddLast(b);
                }
            }

            return selection;
        }