Skip to content

Commit be35be0

Browse files
Meorgetetrapod00
andauthored
Apply suggestions from code review
Co-authored-by: tetrapod <[email protected]>
1 parent 29ec0d2 commit be35be0

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tutorials/scripting/gdscript/gdscript_basics.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,8 +1131,8 @@ A class member variable can be declared static::
11311131
Static variables belong to the class or trait, not instances. This means that static variables
11321132
share values between multiple instances, unlike regular member variables.
11331133

1134-
From inside a class/trait, you can access static variables from any function, both static and non-static.
1135-
From outside the class/trait, you can access static variables using the class/trait or an instance
1134+
From inside a class or trait, you can access static variables from any function, both static and non-static.
1135+
From outside the class or trait, you can access static variables using the class/trait or an instance
11361136
(the second is not recommended as it is less readable).
11371137

11381138
.. note::
@@ -1983,11 +1983,7 @@ A class (stored as a file) can inherit from:
19831983

19841984
Multiple inheritance is not allowed.
19851985

1986-
.. note::
1987-
Godot 4.x introduces `traits <Traits_>`_ to GDScript, which may cover many of
1988-
the use cases for multiple inheritance. See their section for more information
1989-
about how they work.
1990-
1986+
Multiple inheritance is not allowed, but Godot does support `traits <Traits_>`_, which cover many of the same use cases.
19911987
Inheritance uses the ``extends`` keyword::
19921988

19931989
# Inherit/extend a globally available class.
@@ -2180,7 +2176,8 @@ class resource is done by calling the ``new`` function on the class object::
21802176
Traits
21812177
------
21822178

2183-
Traits are collections of behaviors and attributes that classes can use to guarantee
2179+
Since Godot 4.x, GDScript supports traits, which are collections of behaviors and attributes
2180+
that classes can use to guarantee
21842181
functionality to themselves and other objects that may be attempting to use them.
21852182

21862183
Like classes, by default all ``.gdt`` files are unnamed traits, and you must reference

0 commit comments

Comments
 (0)