Move GDScript text onto tip in 2D Getting started 03 chapter (#5732)

This commit is contained in:
Edward
2022-04-08 02:44:48 +03:00
committed by Hugo Locurcio
parent 488f733fcf
commit 68a5e6d81f

View File

@@ -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``.