mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Update 03.coding_the_player.rst
change _on_body_entered(body) to _on_body_entered(_body) to avoid warnings
This commit is contained in:
@@ -489,7 +489,7 @@ this code to the function:
|
|||||||
.. tabs::
|
.. tabs::
|
||||||
.. code-tab:: gdscript GDScript
|
.. code-tab:: gdscript GDScript
|
||||||
|
|
||||||
func _on_body_entered(body):
|
func _on_body_entered(_body):
|
||||||
hide() # Player disappears after being hit.
|
hide() # Player disappears after being hit.
|
||||||
hit.emit()
|
hit.emit()
|
||||||
# Must be deferred as we can't change physics properties on a physics callback.
|
# Must be deferred as we can't change physics properties on a physics callback.
|
||||||
|
|||||||
Reference in New Issue
Block a user