示例#1
0
        public override void Update(GameTime gameTime)
        {
            #region JESUS IS LORD  SOUND REPEATING  JESUS IS LORD!
            if (MediaPlayer.State == MediaState.Stopped)
            {
                MediaPlayer.Play(backgroundMusic);
            }

            #endregion

            backwardscode.Update(gameTime);
            forward.Update(gameTime);
            scrollingbackgroundtop.Update(gameTime);
            scrollingbackgroundbottom.Update(gameTime);
            backwards.Update(gameTime);
            #region JESUS IS LORD CHARACTER CONTROL ALGORITHIMS

            /*
             * if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.G))
             * {
             *  gokuRect.X = gokuRect.X + 1;
             *
             *
             *  redRect.X = redRect.X + 2;
             *
             * }
             *
             * if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.S))
             * {
             *  supermanRect.X = supermanRect.X - 1;
             *  blueRect.X = blueRect.X - 2;
             * }
             *
             * keyState = Keyboard.GetState();
             *
             * if ((gokuRect.X - 250) >= (supermanRect.X))
             *  ScreenManager.Instance.AddScreen(new TitleScreen());
             * if (displayEndScenes)
             * {
             *  if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.D3))
             *  {
             *      ScreenManager.Instance.AddScreen(new GokuWins());
             *  }
             *
             *  if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.D4))
             *  {
             *      ScreenManager.Instance.AddScreen(new SuperManWins());
             *  }
             *
             * }
             */
            #endregion


            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }

            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }
            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }
            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }
            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }

            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }

            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }

            if (hitboxrect[0].Intersects(leapcollisionb))
            {
                broken[0] = true;
                hitsound.Play();
            }



            #region JESUS IS LORD AND IN CONTROL -  THIS CHANGES STATE TO THE OPENING VIDEO
            if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Enter))
            {
                MediaPlayer.Stop();
                //ScreenManager.Instance.AddScreen(new SplashScreen());
                ScreenManager.Instance.AddScreen(new ResumeVideoGame());
            }
            #endregion
        }