mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
scripting_player_input.rst: fix small inaccuracy about conditionals (#10573)
* scripting_player_input.rst: fix small inaccuracy about conditionals
This commit is contained in:
@@ -61,9 +61,10 @@ which the player wants to turn. A value of ``0`` means the player isn't pressing
|
||||
the left or the right arrow key. A value of ``1`` means the player wants to turn
|
||||
right, and ``-1`` means they want to turn left.
|
||||
|
||||
To produce these values, we introduce conditions and the use of ``Input``. A
|
||||
condition starts with the ``if`` keyword in GDScript and ends with a colon. The
|
||||
condition is the expression between the keyword and the end of the line.
|
||||
To produce these values, we introduce conditional statements and the use of ``Input``.
|
||||
A conditional statement starts with the ``if`` keyword in GDScript and ends with a colon. The
|
||||
condition is specifically the expression between the keyword and the colon at
|
||||
the end of the line.
|
||||
|
||||
To check if a key was pressed this frame, we call ``Input.is_action_pressed()``.
|
||||
The method takes a text string representing an input action and returns ``true``
|
||||
|
||||
Reference in New Issue
Block a user