Beispiel #1
0
        private void CacheSpawns()
        {
            MedicalRooms.Clear();
            CryoChambers.Clear();

            foreach (var block in Grids.SelectMany(x => x.GetFatBlocks()))
            {
                if (block is MyMedicalRoom medical)
                {
                    MedicalRooms.Add(medical);
                }
                else if (block is MyCryoChamber cryo)
                {
                    CryoChambers.Add(cryo);
                }
            }
        }
Beispiel #2
0
 public IEnumerable <ICollidable> GetCollidableObjectsWithin(IntRectangle rectangle)
 {
     return(Grids.SelectMany(grid => grid.GetAllWithin(rectangle)).Cast <ICollidable>().Concat(Entities));
 }