summaryrefslogtreecommitdiffstats
path: root/doc/classes/TileMapLayer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/TileMapLayer.xml')
-rw-r--r--doc/classes/TileMapLayer.xml21
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/classes/TileMapLayer.xml b/doc/classes/TileMapLayer.xml
index 135f85de69..43708ca142 100644
--- a/doc/classes/TileMapLayer.xml
+++ b/doc/classes/TileMapLayer.xml
@@ -22,6 +22,21 @@
[b]Note:[/b] If the properties of [param tile_data] object should change over time, use [method notify_runtime_tile_data_update] to notify the [TileMapLayer] it needs an update.
</description>
</method>
+ <method name="_update_cells" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="coords" type="Vector2i[]" />
+ <param index="1" name="forced_cleanup" type="bool" />
+ <description>
+ Called when this [TileMapLayer]'s cells need an internal update. This update may be caused from individual cells being modified or by a change in the [member tile_set] (causing all cells to be queued for an update). The first call to this function is always for initializing all the [TileMapLayer]'s cells. [param coords] contains the coordinates of all modified cells, roughly in the order they were modified. [param forced_cleanup] is [code]true[/code] when the [TileMapLayer]'s internals should be fully cleaned up. This is the case when:
+ - The layer is disabled;
+ - The layer is not visible;
+ - [member tile_set] is set to [code]null[/code];
+ - The node is removed from the tree;
+ - The node is freed.
+ Note that any internal update happening while one of these conditions is verified is considered to be a "cleanup". See also [method update_internals].
+ [b]Warning:[/b] Implementing this method may degrade the [TileMapLayer]'s performance.
+ </description>
+ </method>
<method name="_use_tile_data_runtime_update" qualifiers="virtual">
<return type="bool" />
<param index="0" name="coords" type="Vector2i" />
@@ -120,7 +135,7 @@
<return type="Vector2i[]" />
<param index="0" name="coords" type="Vector2i" />
<description>
- Returns the list of all neighboring cells to the one at [param coords].
+ Returns the list of all neighboring cells to the one at [param coords]. Any neighboring cell is one that is touching edges, so for a square cell 4 cells would be returned, for a hexagon 6 cells are returned.
</description>
</method>
<method name="get_used_cells" qualifiers="const">
@@ -228,7 +243,7 @@
<param index="3" name="ignore_empty_terrains" type="bool" default="true" />
<description>
Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions.
- If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ If [param ignore_empty_terrains] is [code]true[/code], empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
[b]Note:[/b] To work correctly, this method requires the [TileMapLayer]'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.
</description>
</method>
@@ -240,7 +255,7 @@
<param index="3" name="ignore_empty_terrains" type="bool" default="true" />
<description>
Update all the cells in the [param path] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions.
- If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ If [param ignore_empty_terrains] is [code]true[/code], empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
[b]Note:[/b] To work correctly, this method requires the [TileMapLayer]'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.
</description>
</method>