예제 #1
0
        private static void StartSurprise(object senderEvent)
        {
            BoundingSphereD sphere = new BoundingSphereD(new Vector3D(-18.75f, -2.5f, -1.25f), 2);

            m_getEntities.Clear();
            MyGamePruningStructure.GetAllEntitiesInSphere(ref sphere, m_getEntities);

            m_spawnMedical = null;
            foreach (var entity in m_getEntities)
            {
                m_spawnMedical = entity as MyMedicalRoom;
                if (m_spawnMedical != null)
                {
                    m_spawnMedical.OnClose += delegate { m_spawnMedical = null; };
                    break;
                }
            }

            m_started = true;
        }