【发布时间】:2016-06-06 04:57:48
【问题描述】:
我想这样上课:
class Example
field: false --some field shared for all instances of the class
init: (using field) ->
field = true --want to change value of the static field above
但在 lua 中我得到了:
<...>
field = false,
init = function()
local field = true //Different scopes of variable field
end
<...>
在文档中我读到使用有助于处理它的写作
【问题讨论】:
标签: lua moonscript