mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Sync classref with current source
This commit is contained in:
@@ -101,7 +101,7 @@ Methods
|
||||
Signals
|
||||
-------
|
||||
|
||||
.. _class_TileMap_settings_changed:
|
||||
.. _class_TileMap_settings_changed:
|
||||
|
||||
- **settings_changed** **(** **)**
|
||||
|
||||
@@ -110,7 +110,7 @@ Emitted when a tilemap setting has changed.
|
||||
Enumerations
|
||||
------------
|
||||
|
||||
.. _enum_TileMap_HalfOffset:
|
||||
.. _enum_TileMap_HalfOffset:
|
||||
|
||||
enum **HalfOffset**:
|
||||
|
||||
@@ -118,7 +118,7 @@ enum **HalfOffset**:
|
||||
- **HALF_OFFSET_Y** = **1** --- Half offset on the Y coordinate.
|
||||
- **HALF_OFFSET_DISABLED** = **2** --- Half offset disabled.
|
||||
|
||||
.. _enum_TileMap_TileOrigin:
|
||||
.. _enum_TileMap_TileOrigin:
|
||||
|
||||
enum **TileOrigin**:
|
||||
|
||||
@@ -126,7 +126,7 @@ enum **TileOrigin**:
|
||||
- **TILE_ORIGIN_CENTER** = **1** --- Tile origin at its center.
|
||||
- **TILE_ORIGIN_BOTTOM_LEFT** = **2** --- Tile origin at its bottom-left corner.
|
||||
|
||||
.. _enum_TileMap_Mode:
|
||||
.. _enum_TileMap_Mode:
|
||||
|
||||
enum **Mode**:
|
||||
|
||||
@@ -138,6 +138,7 @@ Constants
|
||||
---------
|
||||
|
||||
- **INVALID_CELL** = **-1** --- Returned when a cell doesn't exist.
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -147,10 +148,11 @@ Tutorials
|
||||
---------
|
||||
|
||||
- :doc:`../tutorials/2d/using_tilemaps`
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_TileMap_cell_clip_uv:
|
||||
.. _class_TileMap_cell_clip_uv:
|
||||
|
||||
- :ref:`bool<class_bool>` **cell_clip_uv**
|
||||
|
||||
@@ -160,7 +162,7 @@ Property Descriptions
|
||||
| *Getter* | get_clip_uv() |
|
||||
+----------+--------------------+
|
||||
|
||||
.. _class_TileMap_cell_custom_transform:
|
||||
.. _class_TileMap_cell_custom_transform:
|
||||
|
||||
- :ref:`Transform2D<class_Transform2D>` **cell_custom_transform**
|
||||
|
||||
@@ -172,7 +174,7 @@ Property Descriptions
|
||||
|
||||
The custom :ref:`Transform2D<class_Transform2D>` to be applied to the TileMap's cells.
|
||||
|
||||
.. _class_TileMap_cell_half_offset:
|
||||
.. _class_TileMap_cell_half_offset:
|
||||
|
||||
- :ref:`HalfOffset<enum_TileMap_HalfOffset>` **cell_half_offset**
|
||||
|
||||
@@ -184,7 +186,7 @@ The custom :ref:`Transform2D<class_Transform2D>` to be applied to the TileMap's
|
||||
|
||||
Amount to offset alternating tiles. Uses HALF_OFFSET\_\* constants. Default value: HALF_OFFSET_DISABLED.
|
||||
|
||||
.. _class_TileMap_cell_quadrant_size:
|
||||
.. _class_TileMap_cell_quadrant_size:
|
||||
|
||||
- :ref:`int<class_int>` **cell_quadrant_size**
|
||||
|
||||
@@ -196,7 +198,7 @@ Amount to offset alternating tiles. Uses HALF_OFFSET\_\* constants. Default valu
|
||||
|
||||
The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16.
|
||||
|
||||
.. _class_TileMap_cell_size:
|
||||
.. _class_TileMap_cell_size:
|
||||
|
||||
- :ref:`Vector2<class_Vector2>` **cell_size**
|
||||
|
||||
@@ -208,7 +210,7 @@ The TileMap's quadrant size. Optimizes drawing by batching, using chunks of thi
|
||||
|
||||
The TileMap's cell size.
|
||||
|
||||
.. _class_TileMap_cell_tile_origin:
|
||||
.. _class_TileMap_cell_tile_origin:
|
||||
|
||||
- :ref:`TileOrigin<enum_TileMap_TileOrigin>` **cell_tile_origin**
|
||||
|
||||
@@ -220,7 +222,7 @@ The TileMap's cell size.
|
||||
|
||||
Position for tile origin. Uses TILE_ORIGIN\_\* constants. Default value: TILE_ORIGIN_TOP_LEFT.
|
||||
|
||||
.. _class_TileMap_cell_y_sort:
|
||||
.. _class_TileMap_cell_y_sort:
|
||||
|
||||
- :ref:`bool<class_bool>` **cell_y_sort**
|
||||
|
||||
@@ -232,7 +234,7 @@ Position for tile origin. Uses TILE_ORIGIN\_\* constants. Default value: TILE_OR
|
||||
|
||||
If ``true`` the TileMap's children will be drawn in order of their Y coordinate. Default value: ``false``.
|
||||
|
||||
.. _class_TileMap_collision_bounce:
|
||||
.. _class_TileMap_collision_bounce:
|
||||
|
||||
- :ref:`float<class_float>` **collision_bounce**
|
||||
|
||||
@@ -244,7 +246,7 @@ If ``true`` the TileMap's children will be drawn in order of their Y coordinate.
|
||||
|
||||
Bounce value for static body collisions (see ``collision_use_kinematic``). Default value: 0.
|
||||
|
||||
.. _class_TileMap_collision_friction:
|
||||
.. _class_TileMap_collision_friction:
|
||||
|
||||
- :ref:`float<class_float>` **collision_friction**
|
||||
|
||||
@@ -256,7 +258,7 @@ Bounce value for static body collisions (see ``collision_use_kinematic``). Defau
|
||||
|
||||
Friction value for static body collisions (see ``collision_use_kinematic``). Default value: 1.
|
||||
|
||||
.. _class_TileMap_collision_layer:
|
||||
.. _class_TileMap_collision_layer:
|
||||
|
||||
- :ref:`int<class_int>` **collision_layer**
|
||||
|
||||
@@ -268,7 +270,7 @@ Friction value for static body collisions (see ``collision_use_kinematic``). Def
|
||||
|
||||
The collision layer(s) for all colliders in the TileMap.
|
||||
|
||||
.. _class_TileMap_collision_mask:
|
||||
.. _class_TileMap_collision_mask:
|
||||
|
||||
- :ref:`int<class_int>` **collision_mask**
|
||||
|
||||
@@ -280,7 +282,7 @@ The collision layer(s) for all colliders in the TileMap.
|
||||
|
||||
The collision mask(s) for all colliders in the TileMap.
|
||||
|
||||
.. _class_TileMap_collision_use_kinematic:
|
||||
.. _class_TileMap_collision_use_kinematic:
|
||||
|
||||
- :ref:`bool<class_bool>` **collision_use_kinematic**
|
||||
|
||||
@@ -292,7 +294,7 @@ The collision mask(s) for all colliders in the TileMap.
|
||||
|
||||
If ``true`` TileMap collisions will be handled as a kinematic body. If ``false`` collisions will be handled as static body. Default value: ``false``.
|
||||
|
||||
.. _class_TileMap_mode:
|
||||
.. _class_TileMap_mode:
|
||||
|
||||
- :ref:`Mode<enum_TileMap_Mode>` **mode**
|
||||
|
||||
@@ -304,7 +306,7 @@ If ``true`` TileMap collisions will be handled as a kinematic body. If ``false``
|
||||
|
||||
The TileMap orientation mode. Uses MODE\_\* constants. Default value: MODE_SQUARE.
|
||||
|
||||
.. _class_TileMap_occluder_light_mask:
|
||||
.. _class_TileMap_occluder_light_mask:
|
||||
|
||||
- :ref:`int<class_int>` **occluder_light_mask**
|
||||
|
||||
@@ -316,7 +318,7 @@ The TileMap orientation mode. Uses MODE\_\* constants. Default value: MODE_SQUAR
|
||||
|
||||
The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s).
|
||||
|
||||
.. _class_TileMap_tile_set:
|
||||
.. _class_TileMap_tile_set:
|
||||
|
||||
- :ref:`TileSet<class_TileSet>` **tile_set**
|
||||
|
||||
@@ -331,79 +333,79 @@ The assigned :ref:`TileSet<class_TileSet>`.
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_TileMap_clear:
|
||||
.. _class_TileMap_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clears all cells.
|
||||
|
||||
.. _class_TileMap_fix_invalid_tiles:
|
||||
.. _class_TileMap_fix_invalid_tiles:
|
||||
|
||||
- void **fix_invalid_tiles** **(** **)**
|
||||
|
||||
Clears cells that do not exist in the tileset.
|
||||
|
||||
.. _class_TileMap_get_cell:
|
||||
.. _class_TileMap_get_cell:
|
||||
|
||||
- :ref:`int<class_int>` **get_cell** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** const
|
||||
|
||||
Returns the tile index of the given cell.
|
||||
|
||||
.. _class_TileMap_get_cellv:
|
||||
.. _class_TileMap_get_cellv:
|
||||
|
||||
- :ref:`int<class_int>` **get_cellv** **(** :ref:`Vector2<class_Vector2>` position **)** const
|
||||
|
||||
Returns the tile index of the cell given by a Vector2.
|
||||
|
||||
.. _class_TileMap_get_collision_layer_bit:
|
||||
.. _class_TileMap_get_collision_layer_bit:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_collision_layer_bit** **(** :ref:`int<class_int>` bit **)** const
|
||||
|
||||
Returns ``true`` if the given collision layer bit is set.
|
||||
|
||||
.. _class_TileMap_get_collision_mask_bit:
|
||||
.. _class_TileMap_get_collision_mask_bit:
|
||||
|
||||
- :ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** const
|
||||
|
||||
Returns ``true`` if the given collision mask bit is set.
|
||||
|
||||
.. _class_TileMap_get_used_cells:
|
||||
.. _class_TileMap_get_used_cells:
|
||||
|
||||
- :ref:`Array<class_Array>` **get_used_cells** **(** **)** const
|
||||
|
||||
Returns a :ref:`Vector2<class_Vector2>` array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from ``-1``).
|
||||
|
||||
.. _class_TileMap_get_used_cells_by_id:
|
||||
.. _class_TileMap_get_used_cells_by_id:
|
||||
|
||||
- :ref:`Array<class_Array>` **get_used_cells_by_id** **(** :ref:`int<class_int>` id **)** const
|
||||
|
||||
Returns an array of all cells with the given tile id.
|
||||
|
||||
.. _class_TileMap_get_used_rect:
|
||||
.. _class_TileMap_get_used_rect:
|
||||
|
||||
- :ref:`Rect2<class_Rect2>` **get_used_rect** **(** **)**
|
||||
|
||||
Returns a rectangle enclosing the used (non-empty) tiles of the map.
|
||||
|
||||
.. _class_TileMap_is_cell_transposed:
|
||||
.. _class_TileMap_is_cell_transposed:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_cell_transposed** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** const
|
||||
|
||||
Returns ``true`` if the given cell is transposed, i.e. the x and y axes are swapped.
|
||||
|
||||
.. _class_TileMap_is_cell_x_flipped:
|
||||
.. _class_TileMap_is_cell_x_flipped:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_cell_x_flipped** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** const
|
||||
|
||||
Returns ``true`` if the given cell is flipped in the x axis.
|
||||
|
||||
.. _class_TileMap_is_cell_y_flipped:
|
||||
.. _class_TileMap_is_cell_y_flipped:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_cell_y_flipped** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** const
|
||||
|
||||
Returns ``true`` if the given cell is flipped in the y axis.
|
||||
|
||||
.. _class_TileMap_map_to_world:
|
||||
.. _class_TileMap_map_to_world:
|
||||
|
||||
- :ref:`Vector2<class_Vector2>` **map_to_world** **(** :ref:`Vector2<class_Vector2>` map_position, :ref:`bool<class_bool>` ignore_half_ofs=false **)** const
|
||||
|
||||
@@ -411,7 +413,7 @@ Returns the global position corresponding to the given tilemap (grid-based) coor
|
||||
|
||||
Optionally, the tilemap's half offset can be ignored.
|
||||
|
||||
.. _class_TileMap_set_cell:
|
||||
.. _class_TileMap_set_cell:
|
||||
|
||||
- void **set_cell** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` tile, :ref:`bool<class_bool>` flip_x=false, :ref:`bool<class_bool>` flip_y=false, :ref:`bool<class_bool>` transpose=false, :ref:`Vector2<class_Vector2>` autotile_coord=Vector2( 0, 0 ) **)**
|
||||
|
||||
@@ -425,7 +427,7 @@ Note that data such as navigation polygons and collision shapes are not immediat
|
||||
|
||||
If you need these to be immediately updated, you can call :ref:`update_dirty_quadrants<class_TileMap_update_dirty_quadrants>`.
|
||||
|
||||
.. _class_TileMap_set_cellv:
|
||||
.. _class_TileMap_set_cellv:
|
||||
|
||||
- void **set_cellv** **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` tile, :ref:`bool<class_bool>` flip_x=false, :ref:`bool<class_bool>` flip_y=false, :ref:`bool<class_bool>` transpose=false **)**
|
||||
|
||||
@@ -439,25 +441,25 @@ Note that data such as navigation polygons and collision shapes are not immediat
|
||||
|
||||
If you need these to be immediately updated, you can call :ref:`update_dirty_quadrants<class_TileMap_update_dirty_quadrants>`.
|
||||
|
||||
.. _class_TileMap_set_collision_layer_bit:
|
||||
.. _class_TileMap_set_collision_layer_bit:
|
||||
|
||||
- void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
Sets the given collision layer bit.
|
||||
|
||||
.. _class_TileMap_set_collision_mask_bit:
|
||||
.. _class_TileMap_set_collision_mask_bit:
|
||||
|
||||
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
|
||||
|
||||
Sets the given collision mask bit.
|
||||
|
||||
.. _class_TileMap_update_bitmask_area:
|
||||
.. _class_TileMap_update_bitmask_area:
|
||||
|
||||
- void **update_bitmask_area** **(** :ref:`Vector2<class_Vector2>` position **)**
|
||||
|
||||
Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based x and y coordinates.
|
||||
|
||||
.. _class_TileMap_update_bitmask_region:
|
||||
.. _class_TileMap_update_bitmask_region:
|
||||
|
||||
- void **update_bitmask_region** **(** :ref:`Vector2<class_Vector2>` start=Vector2( 0, 0 ), :ref:`Vector2<class_Vector2>` end=Vector2( 0, 0 ) **)**
|
||||
|
||||
@@ -465,13 +467,13 @@ Applies autotiling rules to the cells in the given region (specified by grid-bas
|
||||
|
||||
Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.
|
||||
|
||||
.. _class_TileMap_update_dirty_quadrants:
|
||||
.. _class_TileMap_update_dirty_quadrants:
|
||||
|
||||
- void **update_dirty_quadrants** **(** **)**
|
||||
|
||||
Updates the tile map's quadrants, allowing things such as navigation and collision shapes to be immediately used if modified.
|
||||
|
||||
.. _class_TileMap_world_to_map:
|
||||
.. _class_TileMap_world_to_map:
|
||||
|
||||
- :ref:`Vector2<class_Vector2>` **world_to_map** **(** :ref:`Vector2<class_Vector2>` world_position **)** const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user