Skip to content

Commit

Permalink
Remove mentions to 2.1.3+ specific features, we're at 2.1.4 for a whi…
Browse files Browse the repository at this point in the history
…le now
  • Loading branch information
akien-mga committed Jan 16, 2018
1 parent d05e23b commit f0c19af
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions learning/scripting/gdscript/gdscript_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ here's a simple example of how GDScript looks.
const answer = 42
const thename = "Charly"

# enums (Godot 2.1.3+)
# enums

enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALLY}
enum Named {THING_1, THING_2, ANOTHER_THING = -1}
Expand Down Expand Up @@ -185,7 +185,7 @@ keywords are reserved words (tokens), they can't be used as identifiers.
+------------+---------------------------------------------------------------------------------------------------------------+
| const | Defines a constant. |
+------------+---------------------------------------------------------------------------------------------------------------+
| enum | Defines an enum. (Godot 2.1.3+) |
| enum | Defines an enum. |
+------------+---------------------------------------------------------------------------------------------------------------+
| var | Defines a variable. |
+------------+---------------------------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -248,7 +248,7 @@ The following is the list of supported operators and their precedence
+---------------------------------------------------------------+-----------------------------------------+
| ``or`` ``||`` | Boolean OR |
+---------------------------------------------------------------+-----------------------------------------+
| ``if x else`` | Ternary if/else (Godot 2.1.3+) |
| ``if x else`` | Ternary if/else |
+---------------------------------------------------------------+-----------------------------------------+
| ``=`` ``+=`` ``-=`` ``*=`` ``/=`` ``%=`` ``&=`` ``|=`` | Assignment, Lowest Priority |
+---------------------------------------------------------------+-----------------------------------------+
Expand Down Expand Up @@ -538,8 +538,6 @@ expressions and must be assigned on initialization.
Enums
^^^^^

*Note, only available in Godot 2.1.3 or higher.*

Enums are basically a shorthand for constants, and are pretty useful if you
want to assign consecutive integers to some constant.

Expand Down Expand Up @@ -660,8 +658,7 @@ Short statements can be written on the same line as the condition::
return x

Sometimes you might want to assign a different initial value based on a
boolean expression. In this case ternary-if expressions come in handy
(Godot 2.1.3+)::
boolean expression. In this case ternary-if expressions come in handy::

var x = [true-value] if [expression] else [false-value]
y += 3 if y < 10 else -1
Expand Down

0 comments on commit f0c19af

Please sign in to comment.