godot/doc/classes/TileSet.xml

557 lines
15 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
<class name="TileSet" inherits="Resource" category="Core" version="3.1">
<brief_description>
Tile library for tilemaps.
</brief_description>
<description>
A TileSet is a library of tiles for a [TileMap]. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
Tiles are referenced by a unique integer ID.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
2017-11-24 16:16:27 +08:00
<method name="_forward_subtile_selection" qualifiers="virtual">
<return type="Vector2">
2017-11-24 16:16:27 +08:00
</return>
<argument index="0" name="autotile_id" type="int">
</argument>
<argument index="1" name="bitmask" type="int">
</argument>
<argument index="2" name="tilemap" type="Object">
</argument>
<argument index="3" name="tile_location" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="_is_tile_bound" qualifiers="virtual">
<return type="bool">
2017-11-24 16:16:27 +08:00
</return>
<argument index="0" name="drawn_id" type="int">
</argument>
<argument index="1" name="neighbor_id" type="int">
</argument>
<description>
</description>
</method>
<method name="autotile_get_bitmask_mode" qualifiers="const">
<return type="int" enum="TileSet.BitmaskMode">
</return>
2018-01-03 20:45:03 +08:00
<argument index="0" name="id" type="int">
2017-11-24 16:16:27 +08:00
</argument>
<description>
</description>
</method>
<method name="autotile_get_size" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
2017-11-24 16:16:27 +08:00
<method name="autotile_set_bitmask_mode">
<return type="void">
</return>
2018-01-03 20:45:03 +08:00
<argument index="0" name="id" type="int">
2017-11-24 16:16:27 +08:00
</argument>
2018-01-03 20:45:03 +08:00
<argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode">
2017-11-24 16:16:27 +08:00
</argument>
<description>
</description>
</method>
<method name="autotile_set_size">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
2018-08-19 12:29:12 +08:00
Clears all tiles.
</description>
</method>
<method name="create_tile">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Creates a new tile with the given ID.
</description>
</method>
<method name="find_tile_by_name" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="name" type="String">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Returns the first tile matching the given name.
</description>
</method>
<method name="get_last_unused_tile_id" qualifiers="const">
<return type="int">
</return>
<description>
2018-08-19 12:29:12 +08:00
Returns the ID following the last currently used ID, useful when creating a new tile.
</description>
</method>
<method name="get_tiles_ids" qualifiers="const">
<return type="Array">
</return>
<description>
2018-08-19 12:29:12 +08:00
Returns an array of all currently used tile IDs.
</description>
</method>
<method name="remove_tile">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Removes the given tile ID.
</description>
</method>
<method name="tile_add_shape">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape" type="Shape2D">
</argument>
<argument index="2" name="shape_transform" type="Transform2D">
</argument>
<argument index="3" name="one_way" type="bool" default="false">
</argument>
2017-11-24 16:16:27 +08:00
<argument index="4" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Adds a shape to the tile.
</description>
</method>
<method name="tile_get_light_occluder" qualifiers="const">
<return type="OccluderPolygon2D">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's light occluder.
</description>
</method>
<method name="tile_get_material" qualifiers="const">
<return type="ShaderMaterial">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's material.
</description>
</method>
<method name="tile_get_modulate" qualifiers="const">
<return type="Color">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's modulation color.
</description>
</method>
<method name="tile_get_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's name.
</description>
</method>
<method name="tile_get_navigation_polygon" qualifiers="const">
<return type="NavigationPolygon">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Returns the navigation polygon of the tile.
</description>
</method>
<method name="tile_get_navigation_polygon_offset" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Returns the offset of the tile's navigation polygon.
</description>
</method>
<method name="tile_get_normal_map" qualifiers="const">
<return type="Texture">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's normal map texture.
</description>
</method>
<method name="tile_get_occluder_offset" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Returns the offset of the tile's light occluder.
</description>
</method>
<method name="tile_get_region" qualifiers="const">
<return type="Rect2">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Returns the tile sub-region in the texture.
</description>
</method>
<method name="tile_get_shape" qualifiers="const">
<return type="Shape2D">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<description>
Returns a tile's given shape.
</description>
</method>
<method name="tile_get_shape_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the number of shapes assigned to a tile.
</description>
</method>
2018-08-30 04:25:11 +08:00
<method name="tile_get_shape_offset" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<description>
Returns the offset of a tile's shape.
2018-08-30 04:25:11 +08:00
</description>
</method>
<method name="tile_get_shape_one_way" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<description>
Returns the one-way collision value of a tile's shape.
</description>
</method>
<method name="tile_get_shape_transform" qualifiers="const">
<return type="Transform2D">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<description>
2018-10-13 14:20:45 +08:00
Returns the [Transform2D] of a tile's shape.
</description>
</method>
<method name="tile_get_shapes" qualifiers="const">
<return type="Array">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns an array of the tile's shapes.
</description>
</method>
<method name="tile_get_texture" qualifiers="const">
<return type="Texture">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's texture.
</description>
</method>
<method name="tile_get_texture_offset" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Returns the texture offset of the tile.
</description>
</method>
2018-04-10 16:12:42 +08:00
<method name="tile_get_tile_mode" qualifiers="const">
<return type="int" enum="TileSet.TileMode">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's [enum TileMode].
2018-04-10 16:12:42 +08:00
</description>
</method>
2018-05-12 15:38:00 +08:00
<method name="tile_get_z_index" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
Returns the tile's z-index (drawing layer).
2018-05-12 15:38:00 +08:00
</description>
</method>
<method name="tile_set_light_occluder">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="light_occluder" type="OccluderPolygon2D">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets a light occluder for the tile.
</description>
</method>
<method name="tile_set_material">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="material" type="ShaderMaterial">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's material.
</description>
</method>
<method name="tile_set_modulate">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="color" type="Color">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's modulation color.
</description>
</method>
<method name="tile_set_name">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="name" type="String">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's name.
</description>
</method>
<method name="tile_set_navigation_polygon">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="navigation_polygon" type="NavigationPolygon">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's navigation polygon.
</description>
</method>
<method name="tile_set_navigation_polygon_offset">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="navigation_polygon_offset" type="Vector2">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets an offset for the tile's navigation polygon.
</description>
</method>
<method name="tile_set_normal_map">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="normal_map" type="Texture">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's normal map texture.
</description>
</method>
<method name="tile_set_occluder_offset">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="occluder_offset" type="Vector2">
</argument>
<description>
Sets an offset for the tile's light occluder.
</description>
</method>
<method name="tile_set_region">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="region" type="Rect2">
</argument>
<description>
Sets the tile's sub-region in the texture. This is common in texture atlases.
</description>
</method>
<method name="tile_set_shape">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<argument index="2" name="shape" type="Shape2D">
</argument>
<description>
Sets a shape for the tile, enabling collision.
</description>
</method>
2018-08-30 04:25:11 +08:00
<method name="tile_set_shape_offset">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<argument index="2" name="shape_offset" type="Vector2">
</argument>
<description>
Sets the offset of a tile's shape.
2018-08-30 04:25:11 +08:00
</description>
</method>
<method name="tile_set_shape_one_way">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<argument index="2" name="one_way" type="bool">
</argument>
<description>
Enables one-way collision on a tile's shape.
</description>
</method>
<method name="tile_set_shape_transform">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
</argument>
<argument index="2" name="shape_transform" type="Transform2D">
</argument>
<description>
Sets a [Transform2D] on a tile's shape.
</description>
</method>
<method name="tile_set_shapes">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shapes" type="Array">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets an array of shapes for the tile, enabling collision.
</description>
</method>
<method name="tile_set_texture">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's texture.
</description>
</method>
<method name="tile_set_texture_offset">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="texture_offset" type="Vector2">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's texture offset.
</description>
</method>
2018-04-10 16:12:42 +08:00
<method name="tile_set_tile_mode">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="tilemode" type="int" enum="TileSet.TileMode">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's [enum TileMode].
2018-04-10 16:12:42 +08:00
</description>
</method>
2018-05-12 15:38:00 +08:00
<method name="tile_set_z_index">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="z_index" type="int">
</argument>
<description>
2018-08-19 12:29:12 +08:00
Sets the tile's drawing index.
2018-05-12 15:38:00 +08:00
</description>
</method>
</methods>
<constants>
2017-11-25 06:16:30 +08:00
<constant name="BITMASK_2X2" value="0" enum="BitmaskMode">
2017-11-24 16:16:27 +08:00
</constant>
<constant name="BITMASK_3X3_MINIMAL" value="1" enum="BitmaskMode">
</constant>
<constant name="BITMASK_3X3" value="2" enum="BitmaskMode">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_TOPLEFT" value="1" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_TOP" value="2" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_TOPRIGHT" value="4" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_LEFT" value="8" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_RIGHT" value="32" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_BOTTOM" value="128" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name="BIND_BOTTOMRIGHT" value="256" enum="AutotileBindings">
2017-11-24 16:16:27 +08:00
</constant>
2018-04-10 16:12:42 +08:00
<constant name="SINGLE_TILE" value="0" enum="TileMode">
</constant>
<constant name="AUTO_TILE" value="1" enum="TileMode">
</constant>
2018-08-21 06:35:30 +08:00
<constant name="ATLAS_TILE" value="2" enum="TileMode">
2018-04-10 16:12:42 +08:00
</constant>
</constants>
</class>