multi/function.lua
Ryan a64482e695 Added the files
Initial file addition
2017-06-01 20:49:33 -04:00

19 lines
363 B
Lua

require("multi")
function multi:newFunction(func)
local c={}
c.func=func
mt={
__index=multi,
__call=function(self,...) if self.Active then return self:func(...) end local t={...} return "PAUSED" end
}
c.Parent=self
function c:Pause()
self.Active=false
end
function c:Resume()
self.Active=true
end
setmetatable(c,mt)
self:create(c)
return c
end