[timer] Rework new() consistently with other classes.

This commit is contained in:
Lorenzo Cogotti 2023-06-01 22:46:39 +02:00
parent d3129070d9
commit 2959abc4f6
1 changed files with 5 additions and 2 deletions

View File

@ -194,8 +194,11 @@ __index = function(tweens, key)
end}) end})
-- Timer instancing -- Timer instancing
function Timer.new() function Timer:new(args)
return setmetatable({functions = {}, tween = Timer.tween}, Timer) self = setmetatable(args or {}, self)
self.functions = {}
return self
end end
return Timer return Timer