A subclass of Monogame's Game object from which the Updating and Rendering actually stems. We need to explicitly create an instance of this in ArtemisEngine.
Inheritance: Microsoft.Xna.Framework.Game
        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();
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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();
        }