Esempio n. 1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(bodyTextures[0], new Rectangle((int)GetCenter().X, (int)GetCenter().Y, bodyTextures[0].Width, bodyTextures[0].Height),
                             new Rectangle(0, 0, bodyTextures[0].Width, bodyTextures[0].Height),
                             Color.White, rotation,
                             new Vector2(bodyTextures[0].Width / 2, bodyTextures[0].Height / 2),
                             SpriteEffects.None, 0f);

            spriteBatch.Draw(bodyTextures[1], rightHand.newPosition, Color.White);



            spriteBatch.Draw(bodyTextures[2], leftHand.newPosition, Color.White);


            if (weapon1 != null)
            {
                spriteBatch.Draw(Systems.BulletManager.gunTextures[weapon1.textureId],
                                 new Rectangle(
                                     (int)weapon1.position.X,
                                     (int)weapon1.position.Y,
                                     Systems.BulletManager.gunTextures[weapon1.textureId].Width,
                                     Systems.BulletManager.gunTextures[weapon1.textureId].Height),
                                 new Rectangle(0, 0,
                                               Systems.BulletManager.gunTextures[weapon1.textureId].Width,
                                               Systems.BulletManager.gunTextures[weapon1.textureId].Height),
                                 Color.White, rotation,
                                 new Vector2(
                                     Systems.BulletManager.gunTextures[weapon1.textureId].Width / 2,
                                     Systems.BulletManager.gunTextures[weapon1.textureId].Height / 2 + 2),
                                 SpriteEffects.None, 0f);
            }

            playerParticleSystem.Draw(spriteBatch);
        }
Esempio n. 2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     tilePartition.DrawTiles(spriteBatch);
     cellSpacePartition.Draw(spriteBatch);
     entityParticle.Draw(spriteBatch);
     bulletManager.Draw(spriteBatch);
 }