예제 #1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            spriteBatch.Begin();

            spelare.Draw(spriteBatch);
            spriteBatch.End();

            // TODO: Add your drawing code here.

            base.Draw(gameTime);
        }
예제 #2
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Thistle);
            spriteBatch.Begin();
            spelare.Draw(spriteBatch);
            enemyone.Draw(spriteBatch);
            enemytwo.Draw(spriteBatch);
            enemythree.Draw(spriteBatch);
            spriteBatch.End();



            base.Draw(gameTime);
        }
예제 #3
0
        protected override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(background, new Rectangle(0, 0, GraphicsDevice.DisplayMode.Width, GraphicsDevice.DisplayMode.Height), Color.White);
            s1.Draw(spriteBatch);
            s2.Draw(spriteBatch);

            foreach (Vector2 RandomEnemySpawn in RandomEnemySpawn)
            {
                Rectangle rec = new Rectangle();
                rec.Location = RandomEnemySpawn.ToPoint();
                rec.Size     = new Point(80, 80);
                spriteBatch.Draw(EnemySpawn, rec, Color.White);
            }

            base.Draw(gameTime);

            spriteBatch.End();
        }