/// <summary>
 /// Removes all entities - TODO - this will have to be unified in MyEntities.cs
 /// </summary>
 void RemoveAllEntities()
 {
     //MyEditor.Static.DeleteAllFromCollidingList();
     MyEditor.Static.CollidingElements.Clear();
     MyEntities.CollisionsElements.Clear();
     MyEditorGizmo.ClearSelection();
     MyEntities.CloseAll(false);
     MyVoxelMaps.RemoveAll();
 }
        void OnParticleStressTest(MyGuiControlButton sender)
        {
            MyEntities.CloseAll(false);


            Vector3 position = MyCamera.Position + MyCamera.ForwardVector * 300;

            int   explosionCount    = 50;
            float particlesDistance = 60;

            Vector3 particlePosition = position + MyCamera.LeftVector * particlesDistance * (explosionCount / 2);

            for (int i = 0; i < explosionCount; i++)
            {
                MyParticleEffect effect = MyParticlesManager.CreateParticleEffect((int)MyParticleEffectsIDEnum.Explosion_Blaster);
                effect.WorldMatrix = Matrix.CreateTranslation(particlePosition);

                effect.OnDelete += new EventHandler(effect_OnDelete);

                particlePosition += -MyCamera.LeftVector * particlesDistance;
            }
        }
예제 #3
0
 void ClearSector()
 {
     MyEntities.CloseAll(false);
 }