objet Lua
SomeClass = { id = "some_class" }
SomeClass.__index = SomeClass
function SomeClass:Create()
local this = {}
setmetatable(this, SomeClass)
return this
end
c1 = SomeClass:Create()
c2 = SomeClass:Create()
print(c1.id) -- "some_class"
print(c2.id) -- "some_class"
abdullah