Exemple #1
0
        public void drawgame()
        {
            // Draw the in-game graphics
            sfunctions3d.resetgraphics(GraphicsDevice);
            ground.drawme(gamecamera, false);
            uservehicle.drawme(gamecamera, true);

            for (int i = 0; i < numberoftrees; i++)
            {
                tree[i].drawme(gamecamera, true);
            }

            for (int i = 0; i < ufos.Count(); i++)
            {
                ufos[i].drawme(gamecamera, true);
            }

            spriteBatch.Begin();
            up.drawme(ref spriteBatch);
            down.drawme(ref spriteBatch);
            left.drawme(ref spriteBatch);
            right.drawme(ref spriteBatch);
            left2.drawme(ref spriteBatch);
            right2.drawme(ref spriteBatch);
            if (gameover)
            {
                spriteBatch.DrawString(mainfont, "GAME OVER", new Vector2(130, 100),
                                       Color.White, MathHelper.ToRadians(0), new Vector2(0, 0), 3f, SpriteEffects.None, 0);
            }
            spriteBatch.End();
        }
Exemple #2
0
        public void drawgame()
        {
            // Draw the in-game graphics
            sfunctions3d.resetgraphics(GraphicsDevice);

            ground.drawme(gamecamera, true);
            robot.drawme(gamecamera, true);

            for (int i = 0; i < numberoftrees; i++)
            {
                tree[i].drawme(gamecamera, true);
            }
            if (gameover)
            {
                spriteBatch.Begin();
                spriteBatch.DrawString(mainfont, "GAME OVER", new Vector2(130, 100),
                                       Color.White, MathHelper.ToRadians(0), new Vector2(0, 0), 3f, SpriteEffects.None, 0);
                spriteBatch.End();
            }
        }