File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 139139 # Creates a typed dictionary with String keys and int values.
140140 # Attempting to use any other type for keys or values will result in an error.
141141 var typed_dict: Dictionary[String, int] = {
142- "some_key": 1,
143- "some_other_key": 2,
142+ "some_key": 1,
143+ "some_other_key": 2,
144144 }
145145
146146 # Creates a typed dictionary with String keys and values of any type.
147147 # Attempting to use any other type for keys will result in an error.
148148 var typed_dict_key_only: Dictionary[String, Variant] = {
149- "some_key": 12.34,
150- "some_other_key": "string",
149+ "some_key": 12.34,
150+ "some_other_key": "string",
151151 }
152152 [/gdscript]
153153 [csharp]
154154 // Creates a typed dictionary with String keys and int values.
155155 // Attempting to use any other type for keys or values will result in an error.
156156 var typedDict = new Godot.Collections.Dictionary< String, int> {
157- {"some_key", 1},
158- {"some_other_key", 2},
157+ {"some_key", 1},
158+ {"some_other_key", 2},
159159 };
160160
161161 // Creates a typed dictionary with String keys and values of any type.
162162 // Attempting to use any other type for keys will result in an error.
163163 var typedDictKeyOnly = new Godot.Collections.Dictionary< String, Variant> {
164- {"some_key", 12.34},
165- {"some_other_key", "string"},
164+ {"some_key", 12.34},
165+ {"some_other_key", "string"},
166166 };
167167 [/csharp]
168168 [/codeblocks]
You can’t perform that action at this time.
0 commit comments