Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用love2d在lua中设计这样的表。虽然我阅读了很多关于 Lua 的教程,但我无法创建这样的表,因为我不理解这个概念。谁能帮我创建这张桌子?
定义:
YourTable = { [1] = {Color1='Red', Color2='Blue', Result='Yellow'}, [2] = {Color1='Blue', Color2='Red', Result='Orange'}, [3] = ... }
访问:
print(YourTable[2].Color1)