public GameoverScreen(Game1 game, Score score)
        {
            font = game.Content.Load<SpriteFont>("myFont");

            //saveScore(score);

            this.score = score;
            this.game = game;
            screenWidth = game.GraphicsDevice.Viewport.Width;
            screenHeight = game.GraphicsDevice.Viewport.Height;
            backgroundTexture = game.Content.Load<Texture2D>("spaceBackground");

            scoreButton = game.Content.Load<Texture2D>("scoreboard");
            scoreButtonPosition = new Vector2(1000, 550);
            scoreButtonRectangle = new Rectangle((int)scoreButtonPosition.X, (int)scoreButtonPosition.Y, scoreButton.Width, scoreButton.Height);
        }
        public ControlsScreen(Game1 game)
        {
            this.game = game;
            screenWidth = game.GraphicsDevice.Viewport.Width;
            screenHeight = game.GraphicsDevice.Viewport.Height;

            font = game.Content.Load<SpriteFont>("myFont");
            smallfont = game.Content.Load<SpriteFont>("scoreFont");

            screenWidth = game.GraphicsDevice.Viewport.Width;
            screenHeight = game.GraphicsDevice.Viewport.Height;
            backgroundTexture = game.Content.Load<Texture2D>("spaceBackground");

            homeButton = game.Content.Load<Texture2D>("mainMenu");
            homeButtonPosition = new Vector2(1050, 650);
            homeButtonRectangle = new Rectangle((int)homeButtonPosition.X, (int)homeButtonPosition.Y, homeButton.Width, homeButton.Height);
        }
Esempio n. 3
0
        public GameScreen(Game1 game)
        {
            runTimer = true;
            this.game = game;
            screenWidth = game.GraphicsDevice.Viewport.Width;
            screenHeight = game.GraphicsDevice.Viewport.Height;

            quitButton = game.Content.Load<Texture2D>("quit");
            quitButtonPosition = new Vector2(1050, 650);
            quitButtonRectangle = new Rectangle((int)quitButtonPosition.X, (int)quitButtonPosition.Y, quitButton.Width, quitButton.Height);

            spaceTexture = game.Content.Load<Texture2D>("spaceBackground");
            playerTexture = game.Content.Load<Texture2D>("ship3");
            playerShip = new Player(game.GraphicsDevice, new Vector2(400, 300), playerTexture);

            playerAttackBallTexture = game.Content.Load<Texture2D>("playerAttack");
            enemyAttackBallTexture = game.Content.Load<Texture2D>("enemyAttack");
            enemyTexture = game.Content.Load<Texture2D>("enemy");

            font = game.Content.Load<SpriteFont>("myFont");
        }
        public ScoreboardScreen(Game1 game)
        {
            scores = loadScores();

            scores.Sort(delegate(Score x, Score y)
            {
                return y.time.CompareTo(x.time);
            });

            font = game.Content.Load<SpriteFont>("myFont");
            scoreFont = game.Content.Load<SpriteFont>("scoreFont");

            this.game = game;
            screenWidth = game.GraphicsDevice.Viewport.Width;
            screenHeight = game.GraphicsDevice.Viewport.Height;
            backgroundTexture = game.Content.Load<Texture2D>("spaceBackground");

            homeButton = game.Content.Load<Texture2D>("mainMenu");
            homeButtonPosition = new Vector2(1050, 650);
            homeButtonRectangle = new Rectangle((int)homeButtonPosition.X, (int)homeButtonPosition.Y, homeButton.Width, homeButton.Height);
        }
Esempio n. 5
0
        public StartScreen(Game1 game)
        {
            this.game = game;
            screenWidth = game.GraphicsDevice.Viewport.Width;
            screenHeight = game.GraphicsDevice.Viewport.Height;

            backgroundTexture = game.Content.Load<Texture2D>("spaceBackground");
            font = game.Content.Load<SpriteFont>("myFont");

            startButton = game.Content.Load<Texture2D>("startButton");
            startButtonPosition = new Vector2((screenWidth / 2) - 100, (screenHeight / 2)-100);

            scoreboardButton = game.Content.Load<Texture2D>("scoreboard");
            scoreboardButtonPosition = new Vector2((screenWidth / 2) - 100, (screenHeight / 2));

            controlsButton = game.Content.Load<Texture2D>("controls");
            controlsButtonPosition = new Vector2((screenWidth / 2) - 100, (screenHeight / 2) + 100);

            startButtonRectangle = new Rectangle((int)startButtonPosition.X, (int)startButtonPosition.Y, startButton.Width, startButton.Height);
            scoreboardButtonRectangle = new Rectangle((int)scoreboardButtonPosition.X, (int)scoreboardButtonPosition.Y, scoreboardButton.Width, scoreboardButton.Height);
            controlsButtonRectangle = new Rectangle((int)controlsButtonPosition.X, (int)controlsButtonPosition.Y, controlsButton.Width, controlsButton.Height);
        }