示例#1
0
        public override void draw(GameTime gameTime)
        {
            mSpriteBatch.Begin();

            mBackground.draw(mSpriteBatch);

            mCurrentBackground.draw(mSpriteBatch);

            mGroupButtons.draw(mSpriteBatch);
            if (currentScreen == mList.Count() - 1)
            {
                mSpriteBatch.Draw(mNext, new Rectangle(586, 474, 80, 86), Color.White);
            }
            if (currentScreen == 0)
            {
                mSpriteBatch.Draw(mPrevious, new Rectangle(350, 474, 80, 86), Color.White);
            }
            mCursor.draw(mSpriteBatch);

            if (mFade != null)
            {
                mFade.draw(mSpriteBatch);
            }

            mSpriteBatch.End();
        }
示例#2
0
        /*
         * public void realignButtons (to be called manually)
         * */

        public void draw(SpriteBatch spriteBatch)
        {
            int complement = (int)GamePlayScreen.sCURRENT_STAGE_X_PROGRESSIVE;

            spriteBatch.Draw(mTextureHudBG, new Rectangle(550 + complement /*- 260*/, Game1.sSCREEN_RESOLUTION_HEIGHT - 96, 238, 96), Color.White);
            spriteBatch.Draw(mTextureHudBGHead, new Rectangle(42 + complement, 38, 285, 64), Color.White);

            if (energy > 0)
            {
                spriteBatch.Draw(mBarraBLeft, new Rectangle(115 + complement, 38 + 15, 7, 20), Color.White);
                spriteBatch.Draw(mBarraBMiddle, new Rectangle(115 + 7 + complement, 38 + 15, (int)(energy * 185), 20), Color.White);
                spriteBatch.Draw(mBarraBRight, new Rectangle(114 + 7 + (int)(energy * 185) + complement, 38 + 15, 7, 20), Color.White);
            }

            if (level > 0)
            {
                spriteBatch.Draw(mBarraOLeft, new Rectangle(114 + complement, 60 + 19, 7, 8), Color.White);
                spriteBatch.Draw(mBarraOMiddle, new Rectangle(114 + 7 + complement, 60 + 19, (int)(level * 147), 8), Color.White);
                spriteBatch.Draw(mBarraORight, new Rectangle(114 + 7 + (int)(level * 147) + complement, 60 + 19, 7, 8), Color.White);
            }
            mGroupButtons.draw(spriteBatch);

            mRectHead = new Rectangle(20 + complement, mRectHead.Y, mRectHead.Width, mRectHead.Height);
            spriteBatch.Draw(mTexturePlayerHead, mRectHead, Color.White);
        }
示例#3
0
        public override void draw(GameTime gameTime)
        {
            mSpriteBatch.Begin();
            //mCurrentBackground.draw(mSpriteBatch);

            mSpriteBatch.Draw(mPauseBackgroundTexture, new Rectangle(0, 0, 800, 600), new Color(0, 0, 0, 0.5f));

            if (!bHelpScreen)
            {
                mSpriteBatch.Draw(mPauseTitleTexture, new Rectangle(400 - 182 / 2, 100, 182, 43), Color.White);

                mGroupButtons.draw(mSpriteBatch);
                mCursor.draw(mSpriteBatch);

                /*if (mFade != null)
                 * {
                 *  mFade.draw(mSpriteBatch);
                 * }*/
            }

            mSpriteBatch.End();

            if (bHelpScreen)
            {
                helpScreen.draw(gameTime);
            }
        }
示例#4
0
        public override void draw(GameTime gameTime)
        {
            mSpriteBatch.Begin();
            mCurrentBackground.draw(mSpriteBatch);

            if (cSCREEN == MainMenuScreen.SCREENS.MAINMENU_SCREEN)
            {
                if (mShowContinueScreen)
                {
                    mButtonContinue.setVisible(true); mButtonContinue.enableCollision(true);
                    mButtonNewGame.setVisible(true); mButtonNewGame.enableCollision(true);

                    mButtonPlay.setVisible(false); mButtonPlay.enableCollision(false);
                    mButtonHelp.setVisible(false); mButtonHelp.enableCollision(false);
                    mButtonCredits.setVisible(false); mButtonCredits.enableCollision(false);
                    mButtonExit.setVisible(false); mButtonExit.enableCollision(false);
                }
                else
                {
                    mButtonContinue.setVisible(false); mButtonContinue.enableCollision(false);
                    mButtonNewGame.setVisible(false); mButtonNewGame.enableCollision(false);

                    mButtonPlay.setVisible(true); mButtonPlay.enableCollision(true);
                    mButtonHelp.setVisible(true); mButtonHelp.enableCollision(true);
                    mButtonCredits.setVisible(true); mButtonCredits.enableCollision(true);
                    mButtonExit.setVisible(true); mButtonExit.enableCollision(true);
                }

                mGroupButtons.draw(mSpriteBatch);
                mSoundIcon.draw(mSpriteBatch);

                mCursor.draw(mSpriteBatch);

                if (mFade != null)
                {
                    mFade.draw(mSpriteBatch);
                }
            }

            mSpriteBatch.End();

            if (cSCREEN != MainMenuScreen.SCREENS.MAINMENU_SCREEN)
            {
                currentScreen.draw(gameTime);
            }
        }
示例#5
0
        public override void draw(GameTime gameTime)
        {
            mSpriteBatch.Begin();
            //mCurrentBackground.draw(mSpriteBatch);

            mSpriteBatch.Draw(mGameoverBackgroundTexture, new Rectangle(0, 0, 800, 600), new Color(0, 0, 0, 0.5f));

            //mSpriteBatch.Draw(mGameoverTitleTexture, new Rectangle(150, 0, 577, 222), Color.White);

            mGroupButtons.draw(mSpriteBatch);
            mCursor.draw(mSpriteBatch);

            /*if (mFade != null)
             * {
             *  mFade.draw(mSpriteBatch);
             * }*/

            mSpriteBatch.End();
        }