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(); }
/// <summary> /// Required override of Monogame.Game.Initialize. Not actually part of the Artemis Engine. /// </summary> protected override sealed void Initialize() { base.Initialize(); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); _RenderPipeline = new RenderPipeline(spriteBatch, GraphicsDevice, graphics); _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(); }