WarTornLands.PlayerClasses.Player.Draw C# (CSharp) Method

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void
        public override void Draw(GameTime gameTime)
        {
            SpriteBatch sb = (Game as Game1)._spriteBatch;

            _tilepos = _tilepos;

            Vector2 drawPos = GetDrawPosition();

            sb.Draw(_animTexture, new Rectangle((int)drawPos.X, (int)drawPos.Y, 64, 128),
                new Rectangle((int)(_animSource.X + _frame) * 64, (int)_animSource.Y * 128, 64, 128), Color.White);

            Vector2 weaponPos = base.GetRelWeaponDrawPos();

            if(weaponPos.LengthSquared() < 9001)
            {
                weaponPos += drawPos;
                sb.Draw(_weaponTex,new Vector2(32,64)+weaponPos, null, Color.White, 0, Vector2.Zero, .1f, SpriteEffects.None, 0);
            }
        }