/// <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() { graphics.PreferredBackBufferWidth = GraphicsDevice.DisplayMode.Width; graphics.PreferredBackBufferHeight = GraphicsDevice.DisplayMode.Height; graphics.IsFullScreen = true; graphics.ApplyChanges(); // TODO: Add your initialization logic here primitives2D = new Primitives2D(); rtsRendrer = new RTSGeometryRenderer(); base.Initialize(); }
/// <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() { graphics.PreferredBackBufferWidth = GraphicsDevice.DisplayMode.Width; graphics.PreferredBackBufferHeight = GraphicsDevice.DisplayMode.Height; graphics.IsFullScreen = true; graphics.ApplyChanges(); rtsRendrer = new RTSGeometryRenderer(); displayWidth = GraphicsDevice.DisplayMode.Width; displayHeight = GraphicsDevice.DisplayMode.Height; centerHorR = 0.25f * displayWidth; centerHorL = 0.75f * displayWidth; centerVertL = 0.5f * displayHeight; centerVertR = 0.5f * displayHeight; spacingVertL = 0.25f * displayHeight; spacingVertR = 0.25f * displayHeight; step = displayHeight / 100; base.Initialize(); }