Public Member Functions | |
| void | AddSprite (T key, string filename, int width, int height) |
| Adds an animation sequence to the list. This automatically creates a new Sprite object, passing the filename and width and height of a frame to it. | |
| bool | SetCurrentSprite (T key, bool beginAnimation) |
| Sets the currently displayed sprite for this collection. Returns true if the key was present, false if the key was not found. | |
| bool | SetCurrentSprite (T[] keys, bool beginAnimation) |
| Sets the currently displayed sprite for this collection. Returns true if either the key or the default key was set. | |
| void | Update () |
| Calls Update on each of the sprites in the collection. | |
| void | Update (double time_ms) |
| Updates the animation of all contained sprites, using the given frame time. | |
| void | Draw (int destX, int destY) |
| Draws the current sprite at the specified destination. | |
| void | Draw (Point dest) |
| Draws the current sprite at the specified destination point. | |
| void | Draw (float dest_x, float dest_y) |
| Draws the current sprite at the specified destination point. | |
| void | Draw (PointF dest) |
| Draws the current sprite at the specified destination point. | |
| void | SetScale (double x, double y) |
| Sets the scale factor for all sprites in this collection. | |
| void | Add (T key, Sprite value) |
| Adds a sprite to the collection, for the specified key. | |
| bool | ContainsKey (T key) |
| Checks to see if the collection contains the specified key. | |
| bool | Remove (T key) |
| Removes a Sprite from this collection. | |
| bool | TryGetValue (T key, out Sprite value) |
| Tries to get the value of the Sprite at the specified key, returning true if successful. | |
| void | Clear () |
| Clears all sprites from this collection. Sprites are not disposed of. If you want them disposed, call DisposeAllSprites() first. | |
| IEnumerator< KeyValuePair< T, Sprite > > | GetEnumerator () |
| Enumerates through KeyValuePair<T, Sprite> objects in this collection. | |
| void | DisposeAllSprites () |
| Disposes of all sprites in the collection. | |
Properties | |
| Sprite | this [T key] [get] |
| Gets the sprite object corresponding to the given key. | |
| Sprite | CurrentSprite [get] |
| Gets the current sprite object. | |
| T | CurrentSpriteKey [get] |
| Returns the key value for the current sprite. | |
| OriginAlignment | DisplayAlignment [set] |
| Sets the display alignment property for all sprites in this collection. | |
| ICollection< T > | Keys [get] |
| Returns a collection of all the keys contained in this SpriteContainer. | |
| ICollection< Sprite > | Values [get] |
| Returns a collection of all the Sprites in this collection. | |
| int | Count [get] |
| Returns how many items are contained. | |
| bool | IsReadOnly [get] |
| This is always false. | |
A SpriteContainer<T> implements the IDictionary<T, Sprite> interface, so it can be thought of as a dictionary of animations. It also contains state information like what the current sprite is.
| T |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Add | ( | T | key, | |
| Sprite | value | |||
| ) |
Adds a sprite to the collection, for the specified key.
| key | ||
| value |
| void AgateLib.Sprites.Old.SpriteContainer< T >.AddSprite | ( | T | key, | |
| string | filename, | |||
| int | width, | |||
| int | height | |||
| ) |
Adds an animation sequence to the list. This automatically creates a new Sprite object, passing the filename and width and height of a frame to it.
| key | The key value for this animation sequence. | |
| filename | Filename to load animation files from | |
| width | Width in pixels of a single frame. | |
| height | Height in pixels of a single frame. |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Clear | ( | ) |
Clears all sprites from this collection. Sprites are not disposed of. If you want them disposed, call DisposeAllSprites() first.
| bool AgateLib.Sprites.Old.SpriteContainer< T >.ContainsKey | ( | T | key | ) |
Checks to see if the collection contains the specified key.
| key |
| void AgateLib.Sprites.Old.SpriteContainer< T >.DisposeAllSprites | ( | ) |
Disposes of all sprites in the collection.
| void AgateLib.Sprites.Old.SpriteContainer< T >.Draw | ( | PointF | dest | ) |
Draws the current sprite at the specified destination point.
| dest |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Draw | ( | float | dest_x, | |
| float | dest_y | |||
| ) |
Draws the current sprite at the specified destination point.
| dest_x | ||
| dest_y |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Draw | ( | Point | dest | ) |
Draws the current sprite at the specified destination point.
| dest |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Draw | ( | int | destX, | |
| int | destY | |||
| ) |
Draws the current sprite at the specified destination.
| destX | ||
| destY |
| IEnumerator<KeyValuePair<T, Sprite> > AgateLib.Sprites.Old.SpriteContainer< T >.GetEnumerator | ( | ) |
| bool AgateLib.Sprites.Old.SpriteContainer< T >.Remove | ( | T | key | ) |
| bool AgateLib.Sprites.Old.SpriteContainer< T >.SetCurrentSprite | ( | T[] | keys, | |
| bool | beginAnimation | |||
| ) |
Sets the currently displayed sprite for this collection. Returns true if either the key or the default key was set.
| keys | An array of keys to try setting to. | |
| beginAnimation | True to restart the animation. |
| bool AgateLib.Sprites.Old.SpriteContainer< T >.SetCurrentSprite | ( | T | key, | |
| bool | beginAnimation | |||
| ) |
Sets the currently displayed sprite for this collection. Returns true if the key was present, false if the key was not found.
| key | The key to set for the current sprite. | |
| beginAnimation | True to restart the animation. |
| void AgateLib.Sprites.Old.SpriteContainer< T >.SetScale | ( | double | x, | |
| double | y | |||
| ) |
Sets the scale factor for all sprites in this collection.
| x | ||
| y |
| bool AgateLib.Sprites.Old.SpriteContainer< T >.TryGetValue | ( | T | key, | |
| out Sprite | value | |||
| ) |
Tries to get the value of the Sprite at the specified key, returning true if successful.
| key | ||
| value |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Update | ( | double | time_ms | ) |
Updates the animation of all contained sprites, using the given frame time.
| time_ms | The amount of time to consider passed, in milliseconds. |
| void AgateLib.Sprites.Old.SpriteContainer< T >.Update | ( | ) |
Calls Update on each of the sprites in the collection.
int AgateLib.Sprites.Old.SpriteContainer< T >.Count [get] |
Returns how many items are contained.
Sprite AgateLib.Sprites.Old.SpriteContainer< T >.CurrentSprite [get] |
Gets the current sprite object.
T AgateLib.Sprites.Old.SpriteContainer< T >.CurrentSpriteKey [get] |
Returns the key value for the current sprite.
OriginAlignment AgateLib.Sprites.Old.SpriteContainer< T >.DisplayAlignment [set] |
Sets the display alignment property for all sprites in this collection.
bool AgateLib.Sprites.Old.SpriteContainer< T >.IsReadOnly [get] |
This is always false.
ICollection<T> AgateLib.Sprites.Old.SpriteContainer< T >.Keys [get] |
Returns a collection of all the keys contained in this SpriteContainer.
Sprite AgateLib.Sprites.Old.SpriteContainer< T >.this[T key] [get] |
Gets the sprite object corresponding to the given key.
| key |
ICollection<Sprite> AgateLib.Sprites.Old.SpriteContainer< T >.Values [get] |
Returns a collection of all the Sprites in this collection.
|
AgateLib Awesome Game and Tool Engine Library |
|