AngryTanks.Client.Player.Draw C# (CSharp) Method

Draw() public method

public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void
        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            // draw all our shots
            foreach (Shot shot in Shots.Values)
            {
                shot.Draw(gameTime, spriteBatch);
            }

            // if we're dead, there's nothing to draw
            if (State == PlayerState.Dead)
                return;

            if (State == PlayerState.Exploding)
                explosion.Draw(gameTime, spriteBatch);
            else
            {
                DrawCallsign(gameTime, spriteBatch);
                DrawStretched(gameTime, spriteBatch);
            }
        }
    }