Merge pull request #27698 from YeldhamDev/doc_tilemap_setcell_override

Document TileMap's new 'set_cell' internal override capability
This commit is contained in:
Rémi Verschelde 2019-04-08 10:15:14 +02:00 committed by GitHub
commit 4c10b1da7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,6 +165,13 @@
Optionally, the tile can also be flipped, transposed, or given autotile coordinates. Optionally, the tile can also be flipped, transposed, or given autotile coordinates.
Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
If you need these to be immediately updated, you can call [method update_dirty_quadrants]. If you need these to be immediately updated, you can call [method update_dirty_quadrants].
Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:
[codeblock]
func set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)
# Write your custom logic here.
# To call the default method:
.set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)
[/codeblock]
</description> </description>
</method> </method>
<method name="set_cellv"> <method name="set_cellv">