Sprite

Simple wrapper for the sprite class, currently only allows for changing the asset used by the sprite by name.
Return to Index
static new ( )
static new ( string asset_name )
__gc ( )
__eq ( am.sprite rhs ) -> ( boolean )
asset ( ) -> ( string )
asset ( string asset_name ) -> ( am.sprite )
static new ( )
Creates a new sprite with no asset.
static new ( string asset_name )
Creates a new sprite using the given asset name.
Parameters:
string asset_name : Name of the asset for this sprite to use.
__gc ( )
Releases the reference counter on the sprite.
__eq ( am.sprite rhs ) -> ( boolean )
Compares this sprite with another sprite object.
Parameters:
am.sprite rhs : The other sprite to compare with.
Returns:
boolean : True if they are the same object.
asset ( ) -> ( string )
Returns the asset name currently used by this sprite. An empty string indicates that no asset has been set.
Returns:
string : The asset name is use.
asset ( string asset_name ) -> ( am.sprite )
Sets the asset name for this sprite to use.
Parameters:
string asset_name : The name of the asset to use.
Returns:
am.sprite : This