mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Merge pull request #94 from oniietzschan/fix-timer-bug-shru
Timer Bug Fix - Fixed indeterminate behavior of new timers.
This commit is contained in:
commit
dde34f98a9
@ -32,7 +32,14 @@ local function _nothing_() end
|
||||
function Timer:update(dt)
|
||||
local to_remove = {}
|
||||
|
||||
local handles = {}
|
||||
local len = 0
|
||||
for handle in pairs(self.functions) do
|
||||
len = len + 1
|
||||
handles[len] = handle
|
||||
end
|
||||
|
||||
for _, handle in ipairs(handles) do
|
||||
-- handle: {
|
||||
-- time = <number>,
|
||||
-- after = <function>,
|
||||
|
Loading…
Reference in New Issue
Block a user