2022-08-12 10:50:42 +02:00
|
|
|
local Timer = require "framework.classes.time.timer"
|
2021-12-04 13:18:54 +01:00
|
|
|
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
|