因为Lua所有的全局变量都保存在一个普通的表中,我们可以使用metatables来改变访问全局变量的行为。 第一个方法如下: ... 所以,我们使用rawget绕过metamethod:.
確定! 回上一頁