/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Engine.SetupEngine(GraphicsDevice); window = Control.FromHandle(this.Window.Handle) as Form; InitializeComponent(window); LoadAllButtons(); input = new InputState(GraphicsDevice); gizmo = new GizmoComponent(Content, GraphicsDevice); gizmo.Initialize(); grid = new GridComponent(GraphicsDevice, 5); takeScreenShot = new Screenshot(); isScreenshotButtonClicked = false; this.IsMouseVisible = true; this.Window.AllowUserResizing = true; entitiesToBeDeleted = new List<SceneEntity>(); //keep this last. window.WindowState = FormWindowState.Maximized; base.Initialize(); }
private void deleteSceneEntities(List<SceneEntity> entitiesToBeDeleted) { foreach (SceneEntity SE in entitiesToBeDeleted) { if (Engine.Entities.Contains(SE)) { Engine.Entities.Remove(SE); gizmo = new GizmoComponent(Content, graphics.GraphicsDevice); gizmo.Initialize(); } } }