dictionary_lua_style.gd 210 B

123456789
  1. func test():
  2. var lua_dict = {
  3. a = 1,
  4. "b" = 2, # Using strings are allowed too.
  5. "with spaces" = 3, # Especially useful when key has spaces...
  6. "2" = 4, # ... or invalid identifiers.
  7. }
  8. print(lua_dict)