AgateLib.Resources.SpriteResource Class Reference

Resource which loads a sprite. There are two different types of sprites, a general purpose sprite, implemented as the Sprite class, and a packed version which maximizes the memory efficiency, implemented as PackedSprite.
XML Attributes:
string name, bool packed, Size size, string image, double timePerFrame (in milliseconds). More...

Inheritance diagram for AgateLib.Resources.SpriteResource:

AgateLib.Resources.AgateResource

List of all members.

Classes

class  SpriteFrameResource
 Class representing a frame of a sprite in a SpriteResource. More...
class  SpriteImageResource
 Class representing an image to automatically load frames from. More...
class  SpriteSubResource

Public Member Functions

 SpriteResource (string name)
 Constructs a SpriteResource object.

Protected Member Functions

override AgateResource Clone ()
 Clones the resource.

Properties

bool HasSize [get]
 Gets a boolean indicating whether or not the sprite size was specified in the resource file.
bool Packed [get, set]
 Gets or sets whether or not this sprite uses the PackedSprite class.
Size Size [get, set]
 Gets or sets the size of this sprite.
double TimePerFrame [get, set]
 Gets or sets the amount of time each frame should be displayed, in milliseconds.
List< SpriteSubResource > ChildElements [get]
 Gets the list of frames.
string Filename [get, set]
 Gets or sets the default filename for sprite frames.


Detailed Description

Resource which loads a sprite. There are two different types of sprites, a general purpose sprite, implemented as the Sprite class, and a packed version which maximizes the memory efficiency, implemented as PackedSprite.
XML Attributes:
string name, bool packed, Size size, string image, double timePerFrame (in milliseconds).

XML Nodes:
Image: Required attributes: string file Optional attribute: Point offset Frame: Required attributes: Rectangle rect, Point offset Optional attribute: string image


Constructor & Destructor Documentation

AgateLib.Resources.SpriteResource.SpriteResource ( string  name  ) 

Constructs a SpriteResource object.

Parameters:
name 


Member Function Documentation

override AgateResource AgateLib.Resources.SpriteResource.Clone (  )  [protected, virtual]

Clones the resource.

Returns:

Implements AgateLib.Resources.AgateResource.


Property Documentation

List<SpriteSubResource> AgateLib.Resources.SpriteResource.ChildElements [get]

Gets the list of frames.

string AgateLib.Resources.SpriteResource.Filename [get, set]

Gets or sets the default filename for sprite frames.

bool AgateLib.Resources.SpriteResource.HasSize [get]

Gets a boolean indicating whether or not the sprite size was specified in the resource file.

bool AgateLib.Resources.SpriteResource.Packed [get, set]

Gets or sets whether or not this sprite uses the PackedSprite class.

Size AgateLib.Resources.SpriteResource.Size [get, set]

Gets or sets the size of this sprite.

double AgateLib.Resources.SpriteResource.TimePerFrame [get, set]

Gets or sets the amount of time each frame should be displayed, in milliseconds.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo