Skip to content

Commit 167b8b7

Browse files
dementivedsnopek
andauthored
Apply suggestions from code review
Co-authored-by: David Snopek <[email protected]>
1 parent d69f556 commit 167b8b7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

getting_started/step_by_step/scripting_first_script.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The equivalent C# code has been included in another tab for convenience.
3030

3131
.. seealso:: To learn more about C#, head to the :ref:`C# basics <doc_c_sharp>` page.
3232

33-
.. seealso:: To learn more about GDExtension C++, head to the :ref:`What is GDExtension? <doc_what_is_gdextension>` page.
33+
.. seealso:: To learn more about GDExtension and godot-cpp, head to the :ref:`What is GDExtension? <doc_what_is_gdextension>` page.
3434

3535
Project setup
3636
-------------
@@ -281,8 +281,8 @@ At the bottom of the script, define the function:
281281
.. code-tab:: cpp C++
282282

283283
void _process(double p_delta) override {
284-
// Note that rotation is a private member variable of Node2D, so the set_rotation function must be used.
285-
// You'll find that a lot of member variables that are public in gdscript/C# are instead private in GDExtension C++.
284+
// Note that properties (like rotation) are accessed via setters and getters in godot-cpp.
285+
GDExtension C++.
286286
set_rotation(get_rotation() + angular_speed * p_delta);
287287
}
288288

@@ -335,7 +335,7 @@ them.
335335

336336
.. code-tab:: cpp C++
337337

338-
// Note that the directional Vector2 constants do not exist in GDExtension right now. So Vector2(0, -1) must be used.
338+
// Note that the directional Vector2 constants do not exist in godot-cpp. So Vector2(0, -1) must be used.
339339
Vector2 velocity = Vector2(0, -1).rotated(get_rotation()) * speed;
340340

341341
set_position(get_position() + velocity * p_delta);

getting_started/step_by_step/scripting_player_input.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Comment out the lines ``var velocity = Vector2.UP.rotated(rotation) * speed`` an
111111

112112
//Vector2 velocity = Vector2(0, -1).rotated(get_rotation()) * speed;
113113

114-
// set_position(get_position() + velocity * p_delta);
114+
//set_position(get_position() + velocity * p_delta);
115115

116116
This will ignore the code that moved the icon's position in a circle without user input from the previous exercise.
117117

getting_started/step_by_step/signals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ what you can do with the Signal type directly.
3737
observer pattern. You can learn more about it in
3838
`Game Programming Patterns <https://gameprogrammingpatterns.com/observer.html>`__.
3939

40-
.. note:: Signals in GDExtension C++ are used in slightly different ways than GDScript or CSharp. To learn more head to the :ref:`GDExtension C++ example <doc_gdextension_cpp_signals_example>` page.
40+
.. note:: Signals in godot-cpp are used in slightly different ways than GDScript or CSharp. To learn more head to the :ref:`GDExtension C++ example <doc_gdextension_cpp_signals_example>` page.
4141

4242
We will now use a signal to make our Godot icon from the previous lesson
4343
(:ref:`doc_scripting_player_input`) move and stop by pressing a button.

0 commit comments

Comments
 (0)