Example #1
0
        protected override void Initialize()
        {
            Graphics.PreferredBackBufferWidth  = 1024;
            Graphics.PreferredBackBufferHeight = 740;
            Graphics.ApplyChanges();

            Direction.Init();
            CommandCard.Init();

            fpsCounter = new FpsCounter(Game);
            Components.Add(fpsCounter);
            fpsCounter.DrawOrder = 0;
            //fpsCounter.Enabled = true;

            SoundEffectManager = new SoundEffectManager(Game);
            Components.Add(SoundEffectManager);
            SoundEffectManager.DrawOrder = 1;
            //soundEffectManager.DrawDebugInfo = true;

            DebugMonitor = new DebugMonitor(Game);
            Components.Add(DebugMonitor);
            DebugMonitor.Enabled  = true;
            DebugMonitor.DrawBox  = true;
            DebugMonitor.Position = Direction.SouthEast;

            ColorTexture.Initialize(GraphicsDevice);

            currentGameState = new Rts(RtsEventHandler);

            base.Initialize();
        }
Example #2
0
 public static void Initialize(GraphicsDevice graphicsDevice)
 {
     White = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.White);
     Black = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Black);
     Red   = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Red);
     Green = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Green);
     Gray  = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Gray);
 }
Example #3
0
 public static void Initialize(GraphicsDevice graphicsDevice)
 {
     White     = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.White);
     Black     = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Black);
     Red       = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Red);
     Green     = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Green);
     Yellow    = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Yellow);
     Gray      = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Gray);
     LightGray = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.LightGray);
     DarkGray  = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.DarkGray);
     Beige     = ColorTexture.Create(graphicsDevice, TextureSize, TextureSize, Color.Beige);
 }
Example #4
0
        protected override void Initialize()
        {
            //Graphics.PreferredBackBufferWidth = 1024;
            //Graphics.PreferredBackBufferHeight = 740;
            //Graphics.PreferredBackBufferWidth = 1280;
            //Graphics.PreferredBackBufferHeight = 720;

            Graphics.PreferredBackBufferWidth  = 1024;
            Graphics.PreferredBackBufferHeight = 576;
            //Graphics.IsFullScreen = true;
            Graphics.ApplyChanges();

            Window.Title = "";

            IsMouseVisible = true;

            Direction.Init();
            CommandCard.Init();
            UnitType.Init();
            StructureType.Init();

            fpsCounter = new FpsCounter(Game);
            Components.Add(fpsCounter);
            fpsCounter.DrawOrder = 0;
            //fpsCounter.Enabled = true;

            SoundEffectManager = new SoundEffectManager(Game);
            Components.Add(SoundEffectManager);
            SoundEffectManager.DrawOrder = 1;
            //soundEffectManager.DrawDebugInfo = true;

            DebugMonitor = new DebugMonitor(Game);
            Components.Add(DebugMonitor);
            DebugMonitor.Enabled  = true;
            DebugMonitor.DrawBox  = true;
            DebugMonitor.Position = Direction.SouthEast;

            ColorTexture.Initialize(GraphicsDevice);

            spriteBatch = new SpriteBatch(GraphicsDevice);

            //CurrentGameState = new Rts(RtsEventHandler);
            CurrentGameState = new StartMenu(StartMenuEventHandler);

            base.Initialize();
        }