2023-07-14 19:35:33 +00:00
|
|
|
local XGDFBaseEvent = require("XEntity/XGuildDorm/Furniture/Events/XGDFBaseEvent")
|
2024-09-01 20:49:41 +00:00
|
|
|
---@class XGDFTestEvent : XGDFBaseEvent
|
2023-07-14 19:35:33 +00:00
|
|
|
local XGDFTestEvent = XClass(XGDFBaseEvent, "XGDFTestEvent")
|
|
|
|
function XGDFTestEvent:Init()
|
|
|
|
self:StartEntryBtnListener()
|
|
|
|
end
|
|
|
|
|
|
|
|
function XGDFTestEvent:CheckOnce()
|
|
|
|
self:Trigger(XTime.GetServerNowTimestamp() % 2 == 0)
|
|
|
|
end
|
|
|
|
|
|
|
|
function XGDFTestEvent:StartEntryBtnListener()
|
|
|
|
self.EntryBtnTimeId = XScheduleManager.ScheduleForever(
|
|
|
|
function()
|
|
|
|
self:CheckOnce()
|
|
|
|
end,5000
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
function XGDFTestEvent:Dispose()
|
|
|
|
XScheduleManager.UnSchedule(self.EntryBtnTimeId)
|
|
|
|
end
|
|
|
|
|
|
|
|
return XGDFTestEvent
|