Inheritance: Perks.Perk
Exemplo n.º 1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            gsm = new GamestateManager();
            //graphics.IsFullScreen = true;
            graphics.PreferredBackBufferHeight = 500;
            graphics.PreferredBackBufferWidth = 900;
            Content.RootDirectory = "Content";
            ExitGame = this;
            ch = new ControlHandler();
            r = new Random();
            p = new Player(ch);
            scores = new Highscores();

            intro = new AsteroidsIntro();
            credit = new Credit();

            screenHeight = graphics.PreferredBackBufferHeight;
            screenWidth = graphics.PreferredBackBufferWidth;
            drawShield = false;
            intersected = false;
            randomized = false;
            shield = new Classes.Perks.ShieldPerk(Content, p);
            speedUp = new Classes.Perks.SpeedUpPerk(Content, p);
            extraLife = new Classes.Perks.ExtraLifePerk(Content, p);
            machineGun = new Classes.Perks.MachineGunPerk(Content, p);
            hud = new HUD(screenWidth, screenHeight, shield);
            pickUp = new Pickup();

            numOfAsteroids = 3;
            currentGameState = 1;
        }