Property | Type | Description | |
---|---|---|---|
isAnimated | bool | ||
isMoving | bool | ||
movementDestination | Vector2 | ||
position | Vector2 | ||
visible | bool |
Method | Description | |
---|---|---|
CopyFromSprite ( Sprite loadedSprite ) : void | ||
Draw ( |
Draw the sprite at its current position.
|
|
Draw ( |
Draw the sprite at the specified position. Assumes the sprite is not moving.
|
|
Draw ( |
Draw the sprite at its current position with a given radian rotation. (This is a flimsy function for special cases. Will be updated when needed.)
|
|
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName ) : void |
Load the texture for the sprite using the Content Pipeline If no frames specified, then assume the sprite will never be animated and thus has only 1 frame.
|
|
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName, int maxNumOfFrames, int maxNumOfFrameSets ) : void |
Load the texture for the sprite using the Content Pipeline
|
|
Sprite ( ) : System | ||
Sprite ( Sprite loadedSprite ) : System | ||
StartAnimation ( float aniInterval, bool onlyAnimateOnce ) : void |
Using the sprite's current frame and frame set, animate through its frameset either indefinitely or at least once, at the given interval.
|
|
StartMovement ( Vector2 destinationPosition, float moveSpeed ) : void |
Set the sprite to move from its current drawing position to the given position, at the specified speed.
|
|
StartMovementTimed ( Vector2 destinationPosition, float timeToMove ) : void |
Set the sprite to move from its current drawing position to the given position, completing it within the specified time.
|
|
Update ( |
public CopyFromSprite ( Sprite loadedSprite ) : void | ||
loadedSprite | Sprite | |
return | void |
public Draw ( |
||
spriteBatch | ||
return | void |
public Draw ( |
||
spriteBatch | ||
drawingPosition | Vector2 | |
return | void |
public Draw ( |
||
spriteBatch | ||
rotation | float | |
return | void |
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName ) : void | ||
contentManager | Microsoft.Xna.Framework.Content.ContentManager | |
textureName | string | |
return | void |
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager contentManager, string textureName, int maxNumOfFrames, int maxNumOfFrameSets ) : void | ||
contentManager | Microsoft.Xna.Framework.Content.ContentManager | |
textureName | string | |
maxNumOfFrames | int | |
maxNumOfFrameSets | int | |
return | void |
public Sprite ( Sprite loadedSprite ) : System | ||
loadedSprite | Sprite | |
return | System |
public StartAnimation ( float aniInterval, bool onlyAnimateOnce ) : void | ||
aniInterval | float | |
onlyAnimateOnce | bool | |
return | void |
public StartMovement ( Vector2 destinationPosition, float moveSpeed ) : void | ||
destinationPosition | Vector2 | |
moveSpeed | float | |
return | void |
public StartMovementTimed ( Vector2 destinationPosition, float timeToMove ) : void | ||
destinationPosition | Vector2 | |
timeToMove | float | |
return | void |
public Update ( |
||
gameTime | ||
return | void |