Exemple #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();
        }
        public GameWorld(TextDisplay AgricultureInformation, TextDisplay FarmerInformation)
        {
            this.AgricultureInformation = AgricultureInformation;
            this.FarmerInformation = FarmerInformation;

            agriculture = 0;
            industrial = 0;
            research = 0;
            UIState = new int[4];

            for (int i = 0; i <= UIState.Length-1; i++)
            {
                UIState[i] = 0;
            }
            //UIState[1] = 1;
            farmers = 0;
        }
Exemple #3
0
        public GameWorld(TextDisplay AgricultureInformation, TextDisplay FarmerInformation)
        {
            this.AgricultureInformation = AgricultureInformation;
            this.FarmerInformation      = FarmerInformation;

            agriculture = 0;
            industrial  = 0;
            research    = 0;
            UIState     = new int[4];

            for (int i = 0; i <= UIState.Length - 1; i++)
            {
                UIState[i] = 0;
            }
            //UIState[1] = 1;
            farmers = 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();
        }