Property | Type | Description | |
---|---|---|---|
_sourceRectangle | Rectangle? | ||
_texture | Microsoft.Xna.Framework.Graphics.Texture2D |
Method | Description | |
---|---|---|
CreateSolidColor ( Vector2 pos, int width, int height, Color color, GraphicsDevice gDev ) : |
Creates a GameSprite of a solid color. The tint color of the resulting object is white.
|
|
Draw ( |
Draws this GameSprite to the specified SpriteBatch.
|
|
GameSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Color tintColor ) : System |
Creates a new GameSprite.
|
|
ScaleToViewport ( |
Scales this GameSprite based on current Viewport size.
|
|
SetCenterAsOrigin ( ) : void |
Sets the center of this GameSprite as the rendering origin.
|
|
Update ( |
Updates this GameSprite. Intended to be overridden by a subclass. |
public static CreateSolidColor ( Vector2 pos, int width, int height, Color color, GraphicsDevice gDev ) : |
||
pos | Vector2 | The position of the new sprite. |
width | int | The initial width of the new sprite. |
height | int | The initial height of the new sprite. |
color | Color | The color of the texture of the new sprite. |
gDev | GraphicsDevice | The |
return |
public Draw ( |
||
spriteBatch | The |
|
return | void |
public GameSprite ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Color tintColor ) : System | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | The image to display on the |
position | Vector2 | |
tintColor | Color | |
return | System |
public ScaleToViewport ( |
||
viewport | Current |
|
return | void |
public Update ( |
||
gameTime | A snapshot of the game timing state values. | |
return | void |