Tile Type

The tile type class represents the type of tile, such as land, water, lava, etc. These types can be added to tiles so that a tile can have multiple types. Each game object also contains a list of tile types which it can pass through.
Return to Index
new ( string tile_type_name )
new ( string tile_type_name , string full_name )
__gc ( )
__eq ( am.tile_type rhs ) -> ( boolean )
name ( ) -> ( string )
full_name ( ) -> ( string )
full_name ( string full_name ) -> ( am.tile_type )
static add_tile_type ( am.tile_type tile_type ) -> ( )
static tile_type ( string tile_type_name ) -> ( am.tile_type )
new ( string tile_type_name )
Creates a new tile type with the given name, this name should be unique to all tile types.
Parameters:
string tile_type_name : The name of the tile type.
new ( string tile_type_name , string full_name )
Creates a new tile type with the given name and full name. This name should be unique to all tile types. The full name is used to display the name of this tile type to the user.
Parameters:
string tile_type_name : The name of the tile type.
string full_name : The full name of this tile type.
__gc ( )
Releases the reference counter on the tile type.
__eq ( am.tile_type rhs ) -> ( boolean )
Compares this tile type against another tile type.
Parameters:
am.tile_type rhs : The other tile type to compare with.
Returns:
boolean : Returns true if they are the same object.
name ( ) -> ( string )
Returns the name of this tile type.
Returns:
string : This tile type's name.
full_name ( ) -> ( string )
Returns the full name of this tile type.
Returns:
string : This tile type's full name.
full_name ( string full_name ) -> ( am.tile_type )
Sets the full name of the tile type. This is used to display the name of the tile type to the user.
Parameters:
string full_name : The full name of the tile type.
Returns:
am.tile_type : This
static add_tile_type ( am.tile_type tile_type ) -> ( )
Register a tile type with the game engine.
Parameters:
am.tile_type tile_type : The tile type to register.
static tile_type ( string tile_type_name ) -> ( am.tile_type )
Looks up a tile type with the given name.
Parameters:
string tile_type_name : The name of the tile type to look up.
Returns:
am.tile_type : The found tile type or nil.