金猪满了后下一次进主城要弹出来
This commit is contained in:
parent
bda768c79f
commit
c1c5e8415e
@ -923,6 +923,12 @@ function MainCityUI:checkMainPop()
|
|||||||
if self:checkGift() then
|
if self:checkGift() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 金猪满了后下次进主城要弹出来
|
||||||
|
if DataManager.GoldPigData:getPopFlag() then
|
||||||
|
DataManager.GoldPigData:markPop()
|
||||||
|
ModuleManager.ActivityManager:showGoldPigUI()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 检查引导
|
-- 检查引导
|
||||||
|
|||||||
@ -22,6 +22,7 @@ function GoldPigData:init(data, initOnLogin)
|
|||||||
self.data.buyTime = (data.buy_at or 0) // 1000
|
self.data.buyTime = (data.buy_at or 0) // 1000
|
||||||
self.endTime = 0
|
self.endTime = 0
|
||||||
self.nextShowTime = 0
|
self.nextShowTime = 0
|
||||||
|
self.popFlag = false
|
||||||
DataManager:unregisterDataCd("GoldPigData")
|
DataManager:unregisterDataCd("GoldPigData")
|
||||||
self:checkOpen()
|
self:checkOpen()
|
||||||
if not initOnLogin then
|
if not initOnLogin then
|
||||||
@ -88,6 +89,17 @@ function GoldPigData:getIsOpen()
|
|||||||
return self.data.isOpen
|
return self.data.isOpen
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function GoldPigData:getPopFlag()
|
||||||
|
if not self:getIsOpen() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return self.popFlag
|
||||||
|
end
|
||||||
|
|
||||||
|
function GoldPigData:markPop()
|
||||||
|
self.popFlag = false
|
||||||
|
end
|
||||||
|
|
||||||
function GoldPigData:addGoldPigCount()
|
function GoldPigData:addGoldPigCount()
|
||||||
if not self.data.isOpen and not self:tryActiveGoldPig() then
|
if not self.data.isOpen and not self:tryActiveGoldPig() then
|
||||||
return
|
return
|
||||||
@ -107,6 +119,7 @@ function GoldPigData:addGoldPigCount()
|
|||||||
self.data.fullTime = Time:getServerTime()
|
self.data.fullTime = Time:getServerTime()
|
||||||
self.endTime = self.data.fullTime + self:getDuration()
|
self.endTime = self.data.fullTime + self:getDuration()
|
||||||
self.nextShowTime = self.endTime + self:getTimeOverCD()
|
self.nextShowTime = self.endTime + self:getTimeOverCD()
|
||||||
|
self.popFlag = true
|
||||||
DataManager:registerDataCd("GoldPigData")
|
DataManager:registerDataCd("GoldPigData")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -206,6 +219,7 @@ function GoldPigData:levelDown()
|
|||||||
self.data.count = currLevelInfo.min_diamond
|
self.data.count = currLevelInfo.min_diamond
|
||||||
self.lastCount = self.data.count
|
self.lastCount = self.data.count
|
||||||
self.maxCount = self:getMaxCount()
|
self.maxCount = self:getMaxCount()
|
||||||
|
self.popFlag = false
|
||||||
end
|
end
|
||||||
|
|
||||||
function GoldPigData:getEndTime()
|
function GoldPigData:getEndTime()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user