Exemplo n.º 1
0
        protected override void LoadContent()
        {
            backgroundSong = Content.Load<Song>("Bowser Background Song");
            MediaPlayer.Play(backgroundSong);
            MediaPlayer.IsRepeating = true;
            Round1 = Content.Load<SoundEffect>("Round 1");
            Round2 = Content.Load<SoundEffect>("Round 2");
            Round3 = Content.Load<SoundEffect>("Final Round");
            punch = Content.Load<SoundEffect>("Punch");
            punchSwoosh = Content.Load<SoundEffect>("PunchSwoosh");
            fireBall = Content.Load<SoundEffect>("FireBall");
            spriteBatch = new SpriteBatch(GraphicsDevice);
            StartScreen = new GameObject(Content.Load<Texture2D>("StartScreen"), graphics);
            stage1 = new GameObject(Content.Load<Texture2D>("stage1"), graphics);
            stage2 = new GameObject(Content.Load<Texture2D>("stage2"), graphics);
            stage3 = new GameObject(Content.Load<Texture2D>("stage3"), graphics);
            EndScreen = new GameObject(Content.Load<Texture2D>("EndScreen"), graphics);
            Bowser1 = Content.Load<Texture2D>("BowserSpriteSheet");
            Bowser2 = Content.Load<Texture2D>("BowserSpriteSheet");
            Bowser1_FireBall = Content.Load<Texture2D>("BowserSpriteSheet");
            Bowser2_FireBall = Content.Load<Texture2D>("BowserSpriteSheet");
            Bowser1_HealthBar = Content.Load<Texture2D>("HealthBar");
            Bowser2_HealthBar = Content.Load<Texture2D>("HealthBar");
            WinMessageDisplay = Content.Load<Texture2D>("WinMessage");
            RoundNumber = Content.Load<Texture2D>("RoundNumber");
            Player1_WinCountBox = Content.Load<Texture2D>("PlayersWinCount");
            Player2_WinCountBox = Content.Load<Texture2D>("PlayersWinCount");


            
            if (WindowIsFullScreen == true)
            {

                playersStandingOnYCoordinate = 500;
                StartScreen.Scale = 1.0f;
                StartScreen.position = new Vector2(640, 360);
                stage1.Scale = 1.0f;
                stage1.position = new Vector2(640, 360);
                stage2.Scale = 1.0f;
                stage2.position = new Vector2(640, 360);
                stage3.Scale = 1.0f;
                stage3.position = new Vector2(640, 360);
                EndScreen.Scale = 1.0f;
                EndScreen.position = new Vector2(640, 360);
                DestinationRectangle1.X = 1100;
                DestinationRectangle2.X = 100;
                DestinationRectangle1.Y = 300;
                DestinationRectangle2.Y = 300;
                DestinationRectangle1_HealthBar = new Rectangle(925, 30, (int)(HealthBar.Bar.Width[0] * 1.2), (int)(HealthBar.Bar.Height[0] * .8));
                DestinationRectangle2_HealthBar = new Rectangle(0, 30, (int)(HealthBar.Bar.Width[0] * 1.2), (int)(HealthBar.Bar.Height[0] * .8));
                DestinationRectangle1_WinCountBox = new Rectangle(955, 0, Message.Player1_WinCountBox.Width[0], Message.Player1_WinCountBox.Height[0]);
                DestinationRectangle2_WinCountBox = new Rectangle(0, 0, Message.Player2_WinCountBox.Width[0], Message.Player2_WinCountBox.Height[0]);
                DestinationRectangle_RoundNumber = new Rectangle(600, 5, (int)(Message.RoundNumber.Width[0] * .4), (int)(Message.RoundNumber.Height[0] * .4));
            }

            else
            {
                StartScreen.Scale = .67f;
                StartScreen.position = new Vector2(420, 240);
                stage1.Scale = 1.0f;
                stage1.position = new Vector2(350, 200);
                stage2.Scale = 1.0f;
                stage2.position = new Vector2(350, 150);
                stage3.Scale = 1.0f;
                stage3.position = new Vector2(350, 150);
                EndScreen.Scale = .67f;
                EndScreen.position = new Vector2(370, 240);
                DestinationRectangle1.X = 450;
                DestinationRectangle2.X = 150;
                DestinationRectangle1.Y = 300;
                DestinationRectangle2.Y = 300;
                DestinationRectangle1_HealthBar = new Rectangle(450, 30, (int)(HealthBar.Bar.Width[0] * 1.2), (int)(HealthBar.Bar.Height[0] * .8));
                DestinationRectangle2_HealthBar = new Rectangle(0, 30, (int)(HealthBar.Bar.Width[0] * 1.2), (int)(HealthBar.Bar.Height[0] * .8));
                DestinationRectangle1_WinCountBox = new Rectangle(475, 0, Message.Player1_WinCountBox.Width[0], Message.Player1_WinCountBox.Height[0]);
                DestinationRectangle2_WinCountBox = new Rectangle(0, 0, Message.Player2_WinCountBox.Width[0], Message.Player2_WinCountBox.Height[0]);
                DestinationRectangle_RoundNumber = new Rectangle(345, 30, (int)(Message.RoundNumber.Width[0] * .4), (int)(Message.RoundNumber.Height[0] * .4));
            }


            Player1CurrentState = playerState.STANDING;
            Player1PreviousState = playerState.STANDING;
            Player2CurrentState = playerState.STANDING;
            Player2PreviousState = playerState.STANDING;
            spriteBatch = new SpriteBatch(GraphicsDevice);
            RoundNumCount = 0;
            frames1 = 0;
            frames2 = 0;
            frames1_Fireball = 0;
            frames2_Fireball = 0;
            player1_WinCount = 0;
            player2_WinCount = 0;
        }
Exemplo n.º 2
0
 public bool checkCollideWith(GameObject object2)
 {
     return ObjectRectangle.Intersects(object2.ObjectRectangle);
 }