C# Class UHSampleGame.SpriteBatchExtensions

Afficher le fichier Open project: holtkampw/UH-Sample-XNA-Project

Méthodes publiques

Méthode Description
DrawInt32 ( this spriteBatch, SpriteFont spriteFont, int value, Vector2 position, Color color ) : Vector2

Extension method for SpriteBatch that draws an integer without allocating any memory. This function avoids garbage collections that are normally caused by calling Int32.ToString or String.Format.

Method Details

DrawInt32() public static méthode

Extension method for SpriteBatch that draws an integer without allocating any memory. This function avoids garbage collections that are normally caused by calling Int32.ToString or String.Format.
public static DrawInt32 ( this spriteBatch, SpriteFont spriteFont, int value, Vector2 position, Color color ) : Vector2
spriteBatch this The SpriteBatch instance whose DrawString method will be invoked.
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont The SpriteFont to draw the integer value with.
value int The integer value to draw.
position Vector2 The screen position specifying where to draw the value.
color Color The color of the text drawn.
Résultat Vector2