improvement(actors): use the new timers modules

This commit is contained in:
Kazhnuz 2019-09-08 12:57:13 +02:00
parent ab3d9abf9f
commit 8290fbb8d2

View file

@ -229,17 +229,16 @@ end
-- Control the integrated timers of the actor
function BaseActor:initTimers()
self.timers = {}
self.timers = core.modules.Timers(self)
end
function BaseActor:addTimer(name, t)
self.timers[name] = Timer(self, name, t)
core.debug:warning("actor", "function actor:addTimer is deprecated, prefer actor.timers:newTimer")
self.timers:newTimer(t, name)
end
function BaseActor:updateTimers(dt)
for k,v in pairs(self.timers) do
v:update(dt)
end
self.timers:update(dt)
end
function BaseActor:timerResponse(name)