-- if this lua file gets included in multiple lua scripts this revents it from being recreated over and over again
if ClassName ~= nil then return end

-- define your class name
ClassName = {}

-- this is where you init things about the class
function ClassName:Create()
    -- create a table that we'll return from this class so the user can work with it
    local obj = {}

    -- example of how to define class/table variables
    obj.test = 5

    -- this assigns all the functions defined below to this table object above
    local k,v
    for k,v in pairs(ClassName) do
        obj[k] = v

    -- return the table so the player can call the functions and access variables
    return obj

-- example of how to define a "class"/table function
function ClassName:Update()

-- another example of a table/class function
function ClassName:PostRender(context)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License