Exemple #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            var    current_display_mode = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode;
            tCoord native_dim           = new tCoord(current_display_mode.Width, current_display_mode.Height);

            mGraphics.IsFullScreen              = false;
            mGraphics.PreferredBackBufferWidth  = native_dim.x;
            mGraphics.PreferredBackBufferHeight = native_dim.y;
            mGraphics.ApplyChanges();

            mSimpleDraw_World  = new SimpleDraw(GraphicsDevice);
            mSimpleDraw_Screen = new SimpleDraw(GraphicsDevice);

            mMouse = new RTSMouse(native_dim, mSimpleDraw_World, mSimpleDraw_Screen);

            base.Initialize();
        }
Exemple #2
0
 public RTSMouse(tCoord screen_dim, SimpleDraw simple_draw_world, SimpleDraw simple_draw_screen)
 {
     mScreenDim        = screen_dim;
     mSimpleDrawWorld  = simple_draw_world;
     mSimpleDrawScreen = simple_draw_screen;
 }