You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
529 B
27 lines
529 B
local Tinkr, Vision = ...
|
|
|
|
local Timer = Vision.Timer
|
|
|
|
local TimeManager = {
|
|
timers = {},
|
|
}
|
|
|
|
TimeManager.__index = TimeManager
|
|
|
|
-- Constructor
|
|
---@return TimeManager
|
|
function TimeManager:New()
|
|
local self = setmetatable({}, TimeManager)
|
|
self.timers = {}
|
|
|
|
return self
|
|
end
|
|
|
|
function TimeManager:GetTimer(label, start_events, reset_events)
|
|
if self.timers[label] == nil then
|
|
self.timers[label] = Timer:New(label, start_events, reset_events)
|
|
return self.timers[label]
|
|
end
|
|
end
|
|
|
|
return TimeManager |