sonic-radiance/sonic-radiance.love/birb/classes/time/func.lua
2021-08-22 17:22:14 +02:00

14 lines
No EOL
322 B
Lua

local Timer = require "birb.classes.time.timer"
local TimedFunction = Timer:extend()
function TimedFunction:new(actor, name, func, t)
TimedFunction.super.new(self, actor, name, t)
self.func = func
end
function TimedFunction:finish()
self.actor.funcs[self.name] = nil
self.func()
end
return TimedFunction