Lua Scope for Corona SDK -
i wondering how might able access obj.isactive outside function such "object:setactive()". pull object table need multiple instances of isactive property individual objects. trying figure out way so.
object
object = {}; objectmeta = {__index = object}; function object.new(args) obj = {}; obj.isactive= false; return setmetatable(obj,objectmeta); end function object:setactive() --?????????????????????????? --self.isactive = nil end return object;
for metatables, can use self follows:
function object:setactive() self.isactive = true end here sscce code: http://eval.in/25148
Comments
Post a Comment