コード例 #1
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();
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: nubington/rts
        protected override void Initialize()
        {
            //Graphics.PreferredBackBufferWidth = 1024;
            //Graphics.PreferredBackBufferHeight = 740;
            //Graphics.PreferredBackBufferWidth = 1280;
            //Graphics.PreferredBackBufferHeight = 720;
            Graphics.PreferredBackBufferWidth = 1024;
            Graphics.PreferredBackBufferHeight = 576;
            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();
        }