@@ -32,6 +32,17 @@ the bar to reflect the change. To do so, in Godot, you would use signals.
3232We will now use a signal to make our Godot icon from the previous lesson
3333(:ref: `doc_scripting_player_input `) move and stop by pressing a button.
3434
35+ .. note :: For this project, we will be following the Godot naming conventions.
36+
37+ - **GDScript **: Classes (nodes) use PascalCase, variables and
38+ functions use snake_case, and constants use ALL_CAPS (See
39+ :ref: `doc_gdscript_styleguide `).
40+
41+ - **C# **: Classes, export variables and methods use PascalCase,
42+ private fields use _camelCase, local variables and parameters use
43+ camelCase (See :ref: `doc_c_sharp_styleguide `). Be careful to type
44+ the method names precisely when connecting signals.
45+
3546.. Example
3647
3748 Scene setup
@@ -156,6 +167,7 @@ the ``not`` keyword to invert the value.
156167
157168 .. code-tab :: csharp C#
158169
170+ // We also specified this function name in PascalCase in the editor's connection window.
159171 private void OnButtonPressed()
160172 {
161173 SetProcess(!IsProcessing());
@@ -221,6 +233,7 @@ Your complete ``sprite_2d.gd`` code should look like the following.
221233 Position += velocity * (float)delta;
222234 }
223235
236+ // We also specified this function name in PascalCase in the editor's connection window.
224237 private void OnButtonPressed()
225238 {
226239 SetProcess(!IsProcessing());
@@ -393,6 +406,7 @@ Here is the complete ``sprite_2d.gd`` file for reference.
393406 Position += velocity * (float)delta;
394407 }
395408
409+ // We also specified this function name in PascalCase in the editor's connection window.
396410 private void OnButtonPressed()
397411 {
398412 SetProcess(!IsProcessing());
0 commit comments