pandemonium_engine/modules/layered_tile_map/doc_classes/LayeredTileData.xml

315 lines
14 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="LayeredTileData" inherits="Object">
<brief_description>
Settings for a single tile in a [LayeredTileSet].
</brief_description>
<description>
[LayeredTileData] object represents a single tile in a [LayeredTileSet]. It is usually edited using the tileset editor, but it can be modified at runtime using [method LayeredTileMap._tile_data_runtime_update].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_collision_polygon">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<description>
Adds a collision polygon to the tile on the given LayeredTileSet physics layer.
</description>
</method>
<method name="get_avoidance_polygon_points" qualifiers="const">
<return type="PoolVector2Array" />
<argument index="0" name="layer_id" type="int" />
<description>
</description>
</method>
<method name="get_avoidance_position" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="layer_id" type="int" />
<description>
</description>
</method>
<method name="get_avoidance_radius" qualifiers="const">
<return type="float" />
<argument index="0" name="layer_id" type="int" />
<description>
</description>
</method>
<method name="get_collision_polygon_one_way_margin" qualifiers="const">
<return type="float" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
Returns the one-way margin (for one-way platforms) of the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="get_collision_polygon_points" qualifiers="const">
<return type="PoolVector2Array" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
Returns the points of the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="get_collision_polygons_count" qualifiers="const">
<return type="int" />
<argument index="0" name="layer_id" type="int" />
<description>
Returns how many polygons the tile has for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="get_constant_angular_velocity" qualifiers="const">
<return type="float" />
<argument index="0" name="layer_id" type="int" />
<description>
Returns the constant angular velocity applied to objects colliding with this tile.
</description>
</method>
<method name="get_constant_linear_velocity" qualifiers="const">
<return type="Vector2" />
<argument index="0" name="layer_id" type="int" />
<description>
Returns the constant linear velocity applied to objects colliding with this tile.
</description>
</method>
<method name="get_custom_data" qualifiers="const">
<return type="Variant" />
<argument index="0" name="layer_name" type="String" />
<description>
Returns the custom data value for custom data layer named [param layer_name].
</description>
</method>
<method name="get_custom_data_by_layer_id" qualifiers="const">
<return type="Variant" />
<argument index="0" name="layer_id" type="int" />
<description>
Returns the custom data value for custom data layer with index [param layer_id].
</description>
</method>
<method name="get_navigation_polygon" qualifiers="const">
<return type="NavigationPolygon" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="flip_h" type="bool" default="false" />
<argument index="2" name="flip_v" type="bool" default="false" />
<argument index="3" name="transpose" type="bool" default="false" />
<description>
Returns the navigation polygon of the tile for the LayeredTileSet navigation layer with index [param layer_id].
[param flip_h], [param flip_v], and [param transpose] allow transforming the returned polygon.
</description>
</method>
<method name="get_occluder" qualifiers="const">
<return type="OccluderPolygon2D" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="flip_h" type="bool" default="false" />
<argument index="2" name="flip_v" type="bool" default="false" />
<argument index="3" name="transpose" type="bool" default="false" />
<description>
Returns the occluder polygon of the tile for the LayeredTileSet occlusion layer with index [param layer_id].
[param flip_h], [param flip_v], and [param transpose] allow transforming the returned polygon.
</description>
</method>
<method name="get_terrain_peering_bit" qualifiers="const">
<return type="int" />
<argument index="0" name="peering_bit" type="int" enum="LayeredTileSet.CellNeighbor" />
<description>
Returns the tile's terrain bit for the given [param peering_bit] direction.
</description>
</method>
<method name="is_collision_polygon_one_way" qualifiers="const">
<return type="bool" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
Returns whether one-way collisions are enabled for the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="remove_collision_polygon">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<description>
Removes the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_avoidance_polygon_points">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon" type="PoolVector2Array" />
<description>
</description>
</method>
<method name="set_avoidance_position">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="position" type="Vector2i" />
<description>
</description>
</method>
<method name="set_avoidance_radius">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="radius" type="float" />
<description>
</description>
</method>
<method name="set_collision_polygon_one_way">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<argument index="2" name="one_way" type="bool" />
<description>
Enables/disables one-way collisions on the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygon_one_way_margin">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<argument index="2" name="one_way_margin" type="float" />
<description>
Enables/disables one-way collisions on the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygon_points">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygon_index" type="int" />
<argument index="2" name="polygon" type="PoolVector2Array" />
<description>
Sets the points of the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygons_count">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="polygons_count" type="int" />
<description>
Sets the polygons count for LayeredTileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_constant_angular_velocity">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="velocity" type="float" />
<description>
Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.
</description>
</method>
<method name="set_constant_linear_velocity">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="velocity" type="Vector2" />
<description>
Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.
</description>
</method>
<method name="set_custom_data">
<return type="void" />
<argument index="0" name="layer_name" type="String" />
<argument index="1" name="value" type="Variant" />
<description>
Sets the tile's custom data value for the LayeredTileSet custom data layer with name [param layer_name].
</description>
</method>
<method name="set_custom_data_by_layer_id">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="value" type="Variant" />
<description>
Sets the tile's custom data value for the LayeredTileSet custom data layer with index [param layer_id].
</description>
</method>
<method name="set_navigation_polygon">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="navigation_polygon" type="NavigationPolygon" />
<description>
Sets the navigation polygon for the LayeredTileSet navigation layer with index [param layer_id].
</description>
</method>
<method name="set_occluder">
<return type="void" />
<argument index="0" name="layer_id" type="int" />
<argument index="1" name="occluder_polygon" type="OccluderPolygon2D" />
<description>
Sets the occluder for the LayeredTileSet occlusion layer with index [param layer_id].
</description>
</method>
<method name="set_terrain_peering_bit">
<return type="void" />
<argument index="0" name="peering_bit" type="int" enum="LayeredTileSet.CellNeighbor" />
<argument index="1" name="terrain" type="int" />
<description>
Sets the tile's terrain bit for the given [param peering_bit] direction.
</description>
</method>
</methods>
<members>
<member name="flip_h" type="bool" setter="set_flip_h" getter="get_flip_h" default="false">
If [code]true[/code], the tile will have its texture flipped horizontally.
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
If [code]true[/code], the tile will have its texture flipped vertically.
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The [Material] to use for this [LayeredTileData]. This can be a [CanvasItemMaterial] to use the default shader, or a [ShaderMaterial] to use a custom shader.
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
Color modulation of the tile.
</member>
<member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
Relative probability of this tile being selected when drawing a pattern of random tiles.
</member>
<member name="terrain" type="int" setter="set_terrain" getter="get_terrain" default="-1">
ID of the terrain from the terrain set that the tile uses.
</member>
<member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1">
ID of the terrain set that the tile uses.
</member>
<member name="texture_origin" type="Vector2i" setter="set_texture_origin" getter="get_texture_origin" default="Vector2i( 0, 0 )">
Offsets the position of where the tile is drawn.
</member>
<member name="transpose" type="bool" setter="set_transpose" getter="get_transpose" default="false">
If [code]true[/code], the tile will display transposed, i.e. with horizontal and vertical texture UVs swapped.
</member>
<member name="vertex_light_attenuation" type="float" setter="set_vertex_light_attenuation" getter="get_vertex_light_attenuation" default="1.0">
</member>
<member name="vertex_light_color" type="Color" setter="set_vertex_light_color" getter="get_vertex_light_color" default="Color( 1, 1, 1, 1 )">
</member>
<member name="vertex_light_enabled" type="bool" setter="set_vertex_light_enabled" getter="get_vertex_light_is_enabled" default="false">
</member>
<member name="vertex_light_item_cull_mask" type="int" setter="set_vertex_light_item_cull_mask" getter="get_vertex_light_item_cull_mask" default="1">
</member>
<member name="vertex_light_layer_range" type="Vector2i" setter="set_vertex_light_layer_range" getter="get_vertex_light_layer_range" default="Vector2i( -512, 512 )">
</member>
<member name="vertex_light_mode" type="int" setter="set_vertex_light_mode" getter="get_vertex_light_mode" enum="LayeredTileData.VertexLight2DMode" default="0">
</member>
<member name="vertex_light_position" type="Vector2i" setter="set_vertex_light_position" getter="get_vertex_light_position" default="Vector2i( 0, 0 )">
</member>
<member name="vertex_light_range" type="Vector2i" setter="set_vertex_light_range" getter="get_vertex_light_range" default="Vector2i( 32, 32 )">
</member>
<member name="vertex_light_z_range" type="Vector2i" setter="set_vertex_light_z_range" getter="get_vertex_light_z_range" default="Vector2i( -1024, 1024 )">
</member>
<member name="y_sort_origin" type="int" setter="set_y_sort_origin" getter="get_y_sort_origin" default="0">
Vertical point of the tile used for determining y-sorted order.
</member>
<member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0">
Ordering index of this tile, relative to [LayeredTileMap].
</member>
</members>
<signals>
<signal name="changed">
<description>
Emitted when any of the properties are changed.
</description>
</signal>
</signals>
<constants>
<constant name="VERTEX_LIGHT_2D_MODE_ADD" value="0" enum="VertexLight2DMode">
</constant>
<constant name="VERTEX_LIGHT_2D_MODE_SUB" value="1" enum="VertexLight2DMode">
</constant>
<constant name="VERTEX_LIGHT_2D_MODE_MIX" value="2" enum="VertexLight2DMode">
</constant>
</constants>
</class>