浏览代码

Document TileMap's new 'set_cell' internal override capability

Michael Alexsander Silva Dias 6 年之前
父节点
当前提交
c8d0c61d91
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      doc/classes/TileMap.xml

+ 7 - 0
doc/classes/TileMap.xml

@@ -165,6 +165,13 @@
 				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.
 				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>
 		</method>
 		<method name="set_cellv">