private ArtemisEngine(Action initializer) : base() { this.initializer = initializer; Initialized = false; gameKernel = new GameKernel( this, GameConstants.ContentFolder, GameConstants.FixedTimeStep, GameConstants.DefaultFrameRate); // This should really be called *before* the ArtemisEngine singleton instance // is even created, but right now we have to call it after created the gameKernel // since gameKernel.FrameRate gets changed by an event that gets raised when the // "FrameRate" option gets changed in UserOptions (which will throw a NullReferenceException // if gameKernel is null). UserOptions.Read(); _MultiformManager = new MultiformManager(); _GameTimer = new GlobalTimer(); _GameUpdater = new GlobalUpdater(); _Mouse = new MouseInput(); _Keyboard = new KeyboardInput(); }
private ArtemisEngine(GameProperties properties, Action initializer) : base() { this.initializer = initializer; Initialized = false; _GameProperties = properties; gameKernel = new GameKernel(this); _MultiformManager = new MultiformManager(); _GameTimer = new GlobalTimer(); _GameUpdater = new GlobalUpdater(); _Mouse = new MouseInput(); _Keyboard = new KeyboardInput(); }
internal DisplayManager( GameKernel game , RenderPipeline renderPipeline , Resolution baseResolution , string windowTitle , Color bgColor ) { this.game = game; this.graphicsDevice = renderPipeline.GraphicsDevice; this.graphicsManager = renderPipeline.GraphicsDeviceManager; this.spriteBatch = renderPipeline.SpriteBatch; window = game.Window; WindowResolution = baseResolution; WindowTitle = windowTitle; BackgroundColour = bgColor; ReinitDisplayProperties(true); }
internal DisplayManager(GameKernel game , RenderPipeline renderPipeline , Resolution baseResolution , string windowTitle , Color bgColor) { this.game = game; this.graphicsDevice = renderPipeline.GraphicsDevice; this.graphicsManager = renderPipeline.GraphicsDeviceManager; this.spriteBatch = renderPipeline.SpriteBatch; window = game.Window; WindowResolution = baseResolution; WindowTitle = windowTitle; BackgroundColour = bgColor; ReinitDisplayProperties(true); }