im not good in html :P
Classes
These can be accesed using _g.req(className). When using that function, the first class you required will be the "super" variable (superclass) in that ModuleScript.
Example Class:
-- ModuleScript(_G.MoonGlobal.class.Example)
local _g = _G.MoonGlobal; _g.req("Object") -- super = Object
local Example = super:new() -- don't pass in the first argument so it only copies the methods, not the properties
function Example:new(name)
-- must start with these 4 lines
local ctor = super:new(name) -- ctor: constructor
table.insert(ctor.type, 1, script.Name)
setmetatable(ctor, self)
self.__index = self
if name then
ctor.Name = name
end
return ctor
end
function Example:PrintName()
print(self.Name)
end
return Example