Browse Source

fmt: type is Node2D

in body_entered(body: Node2D)
Samuel 2 years ago
parent
commit
1a6c89ee65
1 changed files with 1 additions and 1 deletions
  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

@@ -475,7 +475,7 @@ Inspector tab to see the list of signals the player can emit:
 .. image:: img/player_signals.webp
 .. image:: img/player_signals.webp
 
 
 Notice our custom "hit" signal is there as well! Since our enemies are going to
 Notice our custom "hit" signal is there as well! Since our enemies are going to
-be ``RigidBody2D`` nodes, we want the ``body_entered(body: Node)`` signal. This
+be ``RigidBody2D`` nodes, we want the ``body_entered(body: Node2D)`` signal. This
 signal will be emitted when a body contacts the player. Click "Connect.." and
 signal will be emitted when a body contacts the player. Click "Connect.." and
 the "Connect a Signal" window appears. We don't need to change any of these
 the "Connect a Signal" window appears. We don't need to change any of these
 settings so click "Connect" again. Godot will automatically create a function in
 settings so click "Connect" again. Godot will automatically create a function in