jx_client_neibu/lua_probject/main_project/main/majiang/MJCheckG.lua

48 lines
1.2 KiB
Lua
Raw Normal View History

2025-06-16 15:24:27 +08:00
-- local EXMainView = import(".EXMainView")
local MJCheckG = {
}
local M = MJCheckG
function MJCheckG.new()
setmetatable(M, { __index = BaseWindow })
-- setmetatable(M, { __index = BaseWindow })
local self = setmetatable({}, { __index = M })
self.class = 'MJCheckG'
self._currenIndex = 0
self._close_destroy = true
self:init('ui://Common/comp_checkG')
return self
end
function M:init(url)
BaseWindow.init(self, url)
self._view:GetChild('btn_ok').onClick:Set(function()
self:Destroy()
end)
self.valueTemp = 0
self.silder = self._view:GetChild('slider_check')
local showText = self._view:GetChild('n3')
self.coroutine = coroutine.start(function(...)
self.valueTemp = 0
while self.valueTemp < 100 do
2025-07-30 21:55:34 +08:00
-- 让他在72的时候卡顿一下
if self.valueTemp > 72 and self.valueTemp < 80 then
2025-08-23 22:23:17 +08:00
2025-07-30 21:55:34 +08:00
end
2025-06-16 15:24:27 +08:00
self.valueTemp = self.valueTemp + math.random(4)
self.silder.value = self.valueTemp
coroutine.wait(0.1)
end
2025-07-30 21:55:34 +08:00
showText.text = "检测完毕,环境安全"
2025-06-16 15:24:27 +08:00
coroutine.wait(2)
2025-08-23 22:23:17 +08:00
-- self:Destroy()
2025-06-16 15:24:27 +08:00
end)
end
return M