GDScript
2023. 11. 23. 01:08
GDScript: Classes (nodes) use PascalCase, variables and functions use snake_case, and constants use ALL_CAPS (See GDScript style guide).
$ is shorthand for get_node(). $AnimatedSprite2D.play() is the same as get_node("AnimatedSprite2D").play().
In GDScript, $ returns the node at the relative path from the current node, or returns null if the node is not found. Since AnimatedSprite2D is a child of the current node, we can use $AnimatedSprite2D.