Пример #1
0
        public override void Draw(GameTime gameTime)
        {
            graphicsDevice.Clear(Color.BlanchedAlmond);
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied);
            scrolling1.Draw(spriteBatch);
            scrolling2.Draw(spriteBatch);


            back1.Draw(spriteBatch);  //***
            paddle.Draw(spriteBatch); //***
            ball.draw(spriteBatch);
            if (p != null)
            {
                p.Draw(spriteBatch);
            }
            if (showbb)
            {
                paddle.drawBB(spriteBatch, Color.Black);
                paddle.drawHS(spriteBatch, Color.Green);
                dragonList.drawInfo(spriteBatch, Color.Red, Color.Blue);
                LineBatch.drawLineRectangle(spriteBatch, playArea, Color.Blue);
                ball.drawInfo(spriteBatch, Color.Gray, Color.Green);
            }
            if (ball.getPosY() > bot)
            {
                //ball.setPosY(60);
                spriteBatch.DrawString(font1, "Game Over!", new Vector2(100, 100), Color.Green);
                //dragonList.drawActive(spriteBatch);
            }

            //foreach (Sprite3 p in Spritewall)
            //    p.Draw(spriteBatch);
            if (wl != null)
            {
                wl.Draw(spriteBatch, Color.Teal, Color.Red);
            }
            LineBatch.drawLineRectangle(spriteBatch, rectangle, Color.Gray);

            //draw animation
            //string output1 = "Socre:  ";
            Vector2 FontOrigin1 = font1.MeasureString("a") / 2;

            spriteBatch.DrawString(font1, "Score " + scoure.ToString(), new Vector2(100, 100), Color.Green);
            //anmiation1.Draw(spriteBatch);
            // dragon.Draw(spriteBatch);
            //if(dragonList != null)
            dragonList.drawActive(spriteBatch);
            spriteBatch.End();
        }
Пример #2
0
        public override void Draw(GameTime gameTime)
        {
            graphicsDevice.Clear(Color.Chartreuse);
            spriteBatch.Begin();

            back1.Draw(spriteBatch);
            if (p != null)
            {
                p.Draw(spriteBatch);
            }
            if (wl != null)
            {
                wl.Draw(spriteBatch, Color.Teal, Color.Red);
            }
            spriteBatch.End();
        }
Пример #3
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            if (bState == BossState.Phase2)
            {
                sprite.customDraw(spriteBatch, sprite.getPos(), sprite.getColor(), orientation, spriteSize);
            }
            else
            {
                sprite.customDraw(spriteBatch, position, sprite.getColor(), orientation, spriteSize);
            }

            if (PlayerInput.keyHeld(Keys.B))
            {
                sprite.drawInfo(spriteBatch, Color.Red, Color.Green);
                if (bState == BossState.Phase2)
                {
                    wl.Draw(spriteBatch, Color.Red, Color.White);
                }
            }
        }