Forráskód Böngészése

Merge pull request #6720 from notPelf/patch-1

Clarify ternary operator in the style guide
Yuri Sizov 2 éve
szülő
commit
5b59294b8d
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      tutorials/scripting/gdscript/gdscript_styleguide.rst

+ 1 - 1
tutorials/scripting/gdscript/gdscript_styleguide.rst

@@ -318,7 +318,7 @@ The only exception to that rule is the ternary operator:
 
 ::
 
-   next_state = "fall" if not is_on_floor() else "idle"
+   next_state = "idle" if is_on_floor() else "fall"
 
 Format multiline statements for readability
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~