心跳30秒
parent
5f4b6bd160
commit
1c182f160d
|
|
@ -54,6 +54,7 @@ function M:init(url)
|
|||
BaseView.InitView(self, url)
|
||||
self._full_offset = false
|
||||
local view = self._view
|
||||
self.lastTime = 0
|
||||
|
||||
self.com_FamilyChatRoom = FamilyChatRoom:Init(view:GetChild('com_chatRoom'), self)
|
||||
|
||||
|
|
@ -670,8 +671,8 @@ function M:OnUpdate()
|
|||
self:UpdateFamilyRoom(fgCtr, self._group.id)
|
||||
end
|
||||
|
||||
local HeartbeatTime = 3
|
||||
if not self.lastTime or newTime - self.lastTime > HeartbeatTime then
|
||||
local HeartbeatTime = 30
|
||||
if newTime - self.lastTime > HeartbeatTime then
|
||||
fgCtr:FG_SetFamilyHeartbeat(self._group.id, DataManager.SelfUser.account_id, function(res)
|
||||
self:ChangeNumber(fgCtr, self._group.id, 0, self._group.total_member_num, false,
|
||||
1)
|
||||
|
|
|
|||
|
|
@ -329,6 +329,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -329,6 +329,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -458,6 +458,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -330,6 +330,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = {...}
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -450,6 +450,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -454,6 +454,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -455,6 +455,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -329,6 +329,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = { ... }
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@ function M:EventInit()
|
|||
self:UpdateCardBox(0)
|
||||
self._ctr_cardbox.selectedIndex = 0
|
||||
local arg = {...}
|
||||
self:ShowHand(arg)
|
||||
local result = arg[1]
|
||||
local liuju = result.liuju
|
||||
local data = result.info_list
|
||||
|
|
|
|||
|
|
@ -573,4 +573,12 @@ function M:GetPrefix()
|
|||
return get_majiang_prefix(DataManager.CurrenRoom.game_id)
|
||||
end
|
||||
|
||||
-- 所有对家显示手牌
|
||||
function M:ShowHand(msg)
|
||||
|
||||
for _, infoView in pairs(self._player_card_info) do
|
||||
infoView:ShowHand()
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
|
|
@ -459,4 +459,13 @@ function M:ResetCardType()
|
|||
-- end
|
||||
end
|
||||
|
||||
function M:ShowHand(cards)
|
||||
--self._view_handCardList
|
||||
self._view_handCardList:RemoveChildren()
|
||||
for _,card in pairs(cards) do
|
||||
local obj = self._view_handCardList:AddItemFromPool()
|
||||
obj:GetChild("icon").url = 'ui://Main_Majiang/' .. "b202_" .. card
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Reference in New Issue