PGRData/Script/matrix/xmanager/XAprilFoolDayManager.lua

23 lines
971 B
Lua
Raw Normal View History

2024-09-01 20:49:41 +00:00
--2023愚人节
XAprilFoolDayManagerCreator = function()
local XAprilFoolDayManager = {}
2024-09-01 20:49:41 +00:00
-- 标题时间
local TITLE_START_TIME = XTime.ParseToTimestamp(CS.XGame.ClientConfig:GetString("AprilFoolsDayTitleStartTime"))
local TITLE_END_TIME = XTime.ParseToTimestamp(CS.XGame.ClientConfig:GetString("AprilFoolsDayTitleEndTime"))
-- Q版模型时间
local CUTE_START_TIME = XTime.ParseToTimestamp(CS.XGame.ClientConfig:GetString("AprilFoolsDayCuteModeltartTime"))
local CUTE_END_TIME = XTime.ParseToTimestamp(CS.XGame.ClientConfig:GetString("AprilFoolsDayCuteModelEndTime"))
function XAprilFoolDayManager.IsInTitleTime()
local curTime = os.time()
return curTime >= TITLE_START_TIME and curTime < TITLE_END_TIME
end
2024-09-01 20:49:41 +00:00
function XAprilFoolDayManager.IsInCuteModelTime()
local curTime = os.time()
2024-09-01 20:49:41 +00:00
return curTime >= CUTE_START_TIME and curTime < CUTE_END_TIME
end
return XAprilFoolDayManager
end