Update 03.coding_the_player.rst

change _on_body_entered(body) to _on_body_entered(_body) to avoid warnings
This commit is contained in:
el
2023-06-26 18:37:54 +02:00
committed by GitHub
parent 82dde48a72
commit edd946fc31

View File

@@ -489,7 +489,7 @@ this code to the function:
.. tabs::
.. code-tab:: gdscript GDScript
func _on_body_entered(body):
func _on_body_entered(_body):
hide() # Player disappears after being hit.
hit.emit()
# Must be deferred as we can't change physics properties on a physics callback.