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.
如何创建“伪实例”变量或从 Lua 类中定义的简单函数访问实例变量?
我没有找到从类中的简单函数访问实例变量的任何方法。只有当函数是一个方法时,我才能访问它,即在 (anyClass:method()) 之前使用类的前缀 (anyClass:method()) 使用“self”。关键词。谢谢 ;)