Ejemplo n.º 1
0
 /// <summary>
 /// Initialize the game's render pipeline. This has to be called in gameKernel.Initialize
 /// because that's where the spriteBatch has to be created.
 /// </summary>
 /// <param name="sb"></param>
 /// <param name="gd"></param>
 /// <param name="gdm"></param>
 internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm)
 {
     _RenderPipeline = new RenderPipeline(sb, gd, gdm);
     _DisplayManager = new DisplayManager(
         gameKernel,
         _RenderPipeline,
         GameConstants.BaseResolution,
         GameConstants.InitialWindowTitle,
         GameConstants.InitialBackgroundColour
         );
 }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initialize the game's render pipeline. This has to be called in gameKernel.Initialize
 /// because that's where the spriteBatch has to be created.
 /// </summary>
 /// <param name="sb"></param>
 /// <param name="gd"></param>
 /// <param name="gdm"></param>
 internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm)
 {
     _RenderPipeline = new RenderPipeline(sb, gd, gdm);
     _DisplayManager = new DisplayManager(
         gameKernel,
         _RenderPipeline,
         GameConstants.BaseResolution,
         GameConstants.InitialWindowTitle,
         GameConstants.InitialBackgroundColour
         );
 }
Ejemplo n.º 6
0
 internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm)
 {
     _RenderPipeline = new RenderPipeline(sb, gd, gdm);
 }
Ejemplo n.º 7
0
 internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm)
 {
     _RenderPipeline = new RenderPipeline(sb, gd, gdm);
 }