Commit Graph
13 Commits
Author SHA1 Message Date
notPelf beb5f02422 Clarify ternary operator in the style guide
In the current style guide, the example for ternary operators includes a "not" in the conditional which is the same text color as the preceding "if" giving the impression that the format for a ternary operation is "[some_value] if not [condition] else [other_value]" which is incorrect, and may be confusing to figure out. I'm new to Godot and I've never used python (which I understand GDScript is based on). My only experience is with c# which I don't believe has a "not" keyword so I was quite confused by this.

This change would remove "not" from the condition to eliminate confusion, and rearrange the values to keep the meaning of the example code the same. Any alternative that removes the "not" would also work.
2023-02-01 18:41:48 -05:00
BlueStag 135ad68cab Use 4.0 method of connecting to and emitting signals (#6311)
Change docs to use the new method of connecting and emitting signals
2023-01-22 22:01:34 -05:00
Max Hilbrunner 024fedb0f3 Kinematic -> Character 2022-10-15 17:55:24 +02:00
Evanaellio 3cb674285e Fix references to the @tool annotation 2022-09-21 22:48:04 +02:00
Markus Sauermann 57a9ef3fea Add @ to onready annotated variables in examples 2022-02-04 19:33:10 +01:00
Max Hilbrunner 7b758e4739 Merge pull request #5326 from zacryol/inferred-typing-cast
Show example of casting get_node() for static typing in style guide
2021-11-03 14:43:45 +01:00
zacryol 35211f6002 Show example of casting get_node() for inferred static typing in style guide 2021-10-22 11:04:56 -06:00
zacryol 8b5fb7a39d Rename var "character_dir" to "character_dict" in GDScript style guide (#5325) 2021-10-16 01:12:08 +02:00
merumelu 41a3150726 GDScript style guide: tint borders of good/bad code examples (#5138)
Add `rst-class` directives before code blocks to allow custom styling.
2021-08-01 16:09:09 +02:00
Hugo Locurcio 669c163135 Add a GDScript style guide recommendation for multiline wrapping 2021-07-29 15:30:21 +02:00
Vladislav Vorobev 9ffebd0812 Fixed class_name keyword ordering in GDScript style guide
Fixes two examples to follow rules described in "Code order" section of this page.
2021-06-25 12:05:50 +03:00
Nathan Lovato b928c651e7 Add note about line skips in the style guide 2020-11-18 08:10:24 -06:00
Nathan Lovato 4272395ab7 Move scripting section to tutorials/
Closes #4113
2020-10-07 14:05:48 -06:00