浏览代码

Corrected expected output in enum comments

The Yellow Architect 1 年之前
父节点
当前提交
c01e958492
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tutorials/scripting/gdscript/gdscript_basics.rst

+ 2 - 2
tutorials/scripting/gdscript/gdscript_basics.rst

@@ -1236,10 +1236,10 @@ a dictionary can also be used with a named enum.
     func _ready():
         # Access values with Name.KEY, prints '5'
         print(State.STATE_JUMP)
-        # Use constant dictionary functions
+        # Use dictionary methods:
         # prints '["STATE_IDLE", "STATE_JUMP", "STATE_SHOOT"]'
         print(State.keys())
-        # prints '["STATE_IDLE", "STATE_JUMP", "STATE_SHOOT"]'
+        # prints '{ "STATE_IDLE": 0, "STATE_JUMP": 5, "STATE_SHOOT": 6 }'
         print(State)
         # prints '[0, 5, 6]'
         print(State.values())