From 68a5e6d81f98fb1bc1e59602006ef9d0fbdd0313 Mon Sep 17 00:00:00 2001 From: Edward <57063825+solar-core@users.noreply.github.com> Date: Fri, 8 Apr 2022 02:44:48 +0300 Subject: [PATCH] Move GDScript text onto tip in 2D Getting started 03 chapter (#5732) --- getting_started/first_2d_game/03.coding_the_player.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getting_started/first_2d_game/03.coding_the_player.rst b/getting_started/first_2d_game/03.coding_the_player.rst index 8d0c8e27d..5d5456bb9 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -267,11 +267,11 @@ diagonal movement. We also check whether the player is moving so we can call ``play()`` or ``stop()`` on the AnimatedSprite. - ``$`` is shorthand for ``get_node()``. So in the code above, +.. tip:: ``$`` is shorthand for ``get_node()``. So in the code above, ``$AnimatedSprite.play()`` is the same as ``get_node("AnimatedSprite").play()``. -.. tip:: In GDScript, ``$`` returns the node at the relative path from the + In GDScript, ``$`` returns the node at the relative path from the current node, or returns ``null`` if the node is not found. Since AnimatedSprite is a child of the current node, we can use ``$AnimatedSprite``.