ソースを参照

Use Node2D instead of PhysicsBody2D

Gustav 1 年間 前
コミット
a151aa0db2
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

@@ -497,7 +497,7 @@ this code to the function:
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
-    private void OnBodyEntered(PhysicsBody2D body)
+    private void OnBodyEntered(Node2D body)
     {
     {
         Hide(); // Player disappears after being hit.
         Hide(); // Player disappears after being hit.
         EmitSignal(SignalName.Hit);
         EmitSignal(SignalName.Hit);