Tile Instance

The tile instance class represents where a single instance of a tile with an extra data associated. Currently this is only which tile frame to render.
Return to Index
new ( )
new ( am.tile tile )
__gc ( )
__eq ( am.tile_instance rhs ) -> ( boolean )
tile ( ) -> ( am.tile )
tile ( am.tile tile ) -> ( boolean )
tile ( string tile_name ) -> ( boolean )
tile_frame ( ) -> ( integer )
tile_frame ( integer frame ) -> ( am.tile_instance )
new ( )
Creates a new tile instance, it will need to have a tile associated with it before it can be used to render.
new ( am.tile tile )
Creates a new tile instance with the given tile.
Parameters:
am.tile tile : The tile this instance.
__gc ( )
TODO
__eq ( am.tile_instance rhs ) -> ( boolean )
Compares this tile instance with another tile instance.
Parameters:
am.tile_instance rhs : The other tile instance to compare with.
Returns:
boolean : True if they are the same tile instance objects.
tile ( ) -> ( am.tile )
Returns the tile this instance is representing, can be nil.
Returns:
am.tile : The tile this instance is instancing.
tile ( am.tile tile ) -> ( boolean )
Sets the tile this instance representings, can be nil.
Parameters:
am.tile tile : The tile to represent.
Returns:
boolean : Always returns true.
tile ( string tile_name ) -> ( boolean )
Sets the tile based on the tile name, returns true if the tile with given name was found.
Parameters:
string tile_name : The name of the tile to instance.
Returns:
boolean : True if the a tile with the given name was found.
tile_frame ( ) -> ( integer )
Returns the current tile frame.
Returns:
integer : The current tile frame.
tile_frame ( integer frame ) -> ( am.tile_instance )
Sets the current tile frame. This frame refers to the frame in the tile graphic. This will only work for tile graphics that have multiple frames and are not animated.
Parameters:
integer frame : The new tile instance frame.
Returns:
am.tile_instance : This