mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add ScheduleGroup.common
This commit is contained in:
parent
ac8e5f1bd1
commit
ee1608072b
1 changed files with 5 additions and 1 deletions
|
|
@ -429,6 +429,8 @@ function __vc_on_hud_open()
|
|||
hud.open_permanent("core:ingame_chat")
|
||||
end
|
||||
|
||||
local Schedule = require "core:schedule"
|
||||
|
||||
local ScheduleGroup_mt = {
|
||||
__index = {
|
||||
publish = function(self, schedule)
|
||||
|
|
@ -440,10 +442,11 @@ local ScheduleGroup_mt = {
|
|||
for id, schedule in pairs(self._schedules) do
|
||||
schedule:tick(dt)
|
||||
end
|
||||
self.common:tick(dt)
|
||||
end,
|
||||
remove = function(self, id)
|
||||
self._schedules[id] = nil
|
||||
end
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -451,6 +454,7 @@ local function ScheduleGroup()
|
|||
return setmetatable({
|
||||
_next_schedule = 1,
|
||||
_schedules = {},
|
||||
common = Schedule()
|
||||
}, ScheduleGroup_mt)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue