[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})
-- Timer instancing
function Timer.new()
return setmetatable({functions = {}, tween = Timer.tween}, Timer)
function Timer:new(args)
self = setmetatable(args or {}, self)
self.functions = {}
return self
end
return Timer