Преглед на файлове

Merge pull request #2677 from AlexanderPavlenko/patch-1

Update gdscript_basics.rst
Chris Bradfield преди 6 години
родител
ревизия
9d8ae252f7
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      getting_started/scripting/gdscript/gdscript_basics.rst

+ 1 - 1
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -592,7 +592,7 @@ If the value is not a subtype, the casting operation will result in a ``null`` v
 ::
 
     var my_node2D: Node2D
-    my_node2D = $Button # Results in 'null' since a Button is not a subtype of Node2D
+    my_node2D = $Button as Node2D # Results in 'null' since a Button is not a subtype of Node2D
 
 For built-in types, they will be forcibly converted if possible, otherwise the
 engine will raise an error.