protected override void Update(GameTime gameTime) { if (!this.HasLoadedContent) { this.LoadContent(); } if (WebRenderer.Enabled) { XNAWebRenderer.XNAWR_Update(); } if (!this.resolutionSet) { this.setNewGraphics(); this.resolutionSet = true; } TimeSpan elapsedGameTime = gameTime.ElapsedGameTime; PatternDrawer.update((float)elapsedGameTime.TotalSeconds); elapsedGameTime = gameTime.ElapsedGameTime; GuiData.setTimeStep((float)elapsedGameTime.TotalSeconds); elapsedGameTime = gameTime.ElapsedGameTime; MusicManager.Update((float)elapsedGameTime.TotalSeconds); elapsedGameTime = gameTime.ElapsedGameTime; ThemeManager.Update((float)elapsedGameTime.TotalSeconds); AlienwareFXManager.UpdateForOS((object)OS.currentInstance); base.Update(gameTime); }
protected override void Initialize() { this.sman = new ScreenManager((Game)this); this.Components.Add((IGameComponent)this.sman); this.graphics.PreferMultiSampling = true; NameGenerator.init(); PatternDrawer.init(this.Content); ProgramList.init(); Cube3D.Initilize(this.graphics.GraphicsDevice); AlienwareFXManager.Init(); this.graphics.GraphicsDevice.DeviceLost += new EventHandler <EventArgs>(this.GraphicsDevice_DeviceLost); base.Initialize(); }
private void handleExit(object sender, EventArgs e) { Game1.threadsExiting = true; MusicManager.stop(); AlienwareFXManager.ReleaseHandle(); }