コード例 #1
0
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            //set up the viewport to match screen resolution and set to full screen
            graphics.PreferredBackBufferWidth  = screenResolutionWidth;
            graphics.PreferredBackBufferHeight = screenResolutionHeight;
            //graphics.IsFullScreen = true;
            graphics.ApplyChanges();

            this.IsMouseVisible = true;

            //set time to zero
            elapsedTime = 0;

            minWaitTime = 200;

            aColor = Color.White;

            debugText              = new TextDisplay(this.Content, "test", new Vector2(0, 0));
            buildingDetails        = new TextDisplay(this.Content, "test", new Vector2(310, 260));
            macroResources         = new TextDisplay(this.Content, "test", new Vector2(1010, 260));
            buildingInformation    = new TextDisplay(this.Content, "test", new Vector2(1010, 900));
            AgricultureInformation = new TextDisplay(this.Content, "test", new Vector2(1030, 600));
            FarmerInformation      = new TextDisplay(this.Content, "test", new Vector2(1430, 600));

            gameArt = new GameArt(this.Content);

            theGameWorld = new GameWorld(AgricultureInformation, FarmerInformation);

            base.Initialize();
        }
コード例 #2
0
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            //set up the viewport to match screen resolution and set to full screen
            graphics.PreferredBackBufferWidth = screenResolutionWidth;
            graphics.PreferredBackBufferHeight = screenResolutionHeight;
            //graphics.IsFullScreen = true;
            graphics.ApplyChanges();

            this.IsMouseVisible = true;

            //set time to zero
            elapsedTime = 0;

            minWaitTime = 200;

            aColor = Color.White;

            debugText = new TextDisplay(this.Content, "test", new Vector2(0, 0));
            buildingDetails = new TextDisplay(this.Content, "test", new Vector2(310, 260));
            macroResources = new TextDisplay(this.Content, "test", new Vector2(1010, 260));
            buildingInformation = new TextDisplay(this.Content, "test", new Vector2(1010, 900));
            AgricultureInformation = new TextDisplay(this.Content, "test", new Vector2(1030, 600));
            FarmerInformation = new TextDisplay(this.Content, "test", new Vector2(1430, 600));

            gameArt = new GameArt(this.Content);

            theGameWorld = new GameWorld(AgricultureInformation, FarmerInformation);

            base.Initialize();
        }