浏览代码

Merge pull request #7566 from dahliakyu/patch-1

Update 03.coding_the_player.rst
Matthew 6 月之前
父节点
当前提交
e3986bf71e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      getting_started/first_2d_game/03.coding_the_player.rst

+ 1 - 1
getting_started/first_2d_game/03.coding_the_player.rst

@@ -399,7 +399,7 @@ Next, add 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.