diff options
author | Gilles Roudière <gilles.roudiere@gmail.com> | 2023-01-18 13:35:58 +0100 |
---|---|---|
committer | Gilles Roudière <gilles.roudiere@gmail.com> | 2023-01-18 15:56:31 +0100 |
commit | 68afc0afa5233b95de98eb74223e8a405f79ddb0 (patch) | |
tree | 2f33b415251e1620611499dd1d592d5951cee986 /doc/classes | |
parent | 9ebb3e3107bee82da2b4eafad685978c26bc1a2c (diff) |
Bring back TileMap::get_cells_by_id
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/TileMap.xml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 8176901ff7..f67b84f96f 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -185,7 +185,19 @@ <return type="Vector2i[]" /> <param index="0" name="layer" type="int" /> <description> - Returns a [Vector2] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1. + Returns a [Vector2i] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1. + </description> + </method> + <method name="get_used_cells_by_id" qualifiers="const"> + <return type="Vector2i[]" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="source_id" type="int" default="-1" /> + <param index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> + <param index="3" name="alternative_tile" type="int" default="-1" /> + <description> + Returns a [Vector2i] array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source ([param source_id]), their atlas coordinates ([param atlas_coords]) or alternative id ([param source_id]). + If a parameter has it's value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as [method get_used_cells]. + A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1. </description> </method> <method name="get_used_rect"> |