踩坑点 lua 中的枚举需要手动赋初始值(C#是会自动赋 0,1,2,3…) 错误写法: local EnumFruit= { Apple, Banana, Pear } 正确写法: local EnumFruit= { Apple = 1, Banana = 2, Pear = 3 }