重连跟新手牌梭哈

master
罗家炜 2025-05-15 18:56:36 +08:00
parent cf897e81f4
commit a61888e8dd
2 changed files with 39 additions and 68 deletions

View File

@ -467,11 +467,12 @@ function M:ReconnectForClearing()
end end
if player.seat == self._room.self_player.seat then -- if player.seat == self._room.self_player.seat then
player_card_info:InitPoker(player.hand_list, false) -- player_card_info:InitPoker(player.hand_list, false)
else -- else
player_card_info:UpdateHandPoker(player.hand_list, false, true) -- player_card_info:UpdateHandPoker(player.hand_list, false, true)
end -- end
player_card_info:UpdateHandPoker(player.hand_list)
-- if player.out_card_list[1] == 0 then -- if player.out_card_list[1] == 0 then
-- player_card_info:SetOutCardInfo(nil, false) -- player_card_info:SetOutCardInfo(nil, false)
-- else -- else

View File

@ -32,76 +32,46 @@ function PKSettingView.new(blur_view, show_type, isjiesan, url, cardSizeHandle)
end end
function M:init(url) function M:init(url)
SettingView.init(self, url) BaseWindow.init(self, url)
-- -- show_type:1隐藏所有 2隐藏解散和换牌 3隐藏返回和换牌
-- -- 设置界面有换牌功能的需要在mainview中重写方法UpdateCard
-- self._view:GetController('type').selectedIndex = self._show_type
-- -- show_type1玩法的换牌功能
-- if self._show_type == 1 then
-- local room = DataManager.CurrenRoom
-- local c1 = self._view:GetController('paimian')
-- local user_id = DataManager.SelfUser.account_id
-- local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'pai')
-- if json_data == nil then
-- local _gamectr = self._gamectr
-- c1.selectedIndex = 0
-- else
-- local _data = json.decode(json_data)
-- local pai = _data['pai']
-- c1.selectedIndex = pai local view = self._view
-- end local slider_sound = view:GetChild('slider_vedio_sound')
local slider_music = view:GetChild('slider_vedio_music')
local btn_music = view:GetChild('btn_vedio_music')
local btn_sound = view:GetChild('btn_vedio_sound')
-- slider_sound.value = GameApplication.Instance.SoundValue
-- slider_music.value = GameApplication.Instance.MusicValue
-- c1.onChanged:Set( slider_music.onChanged:Add(function()
-- function() -- GameApplication.Instance.MusicValue = slider_music.value
-- if self.__changePokerCallBack then -- btn_music.selected = false
-- self.__changePokerCallBack(c1.selectedIndex) -- GameApplication.Instance.MusicMute = false;
-- end end)
-- --点击换牌按钮后保存当前游戏的牌
-- local user_id = DataManager.SelfUser.account_id
-- local _data = {}
-- _data['pai'] = c1.selectedIndex
-- local key = user_id .. room.game_id .. 'pai'
-- Utils.SaveLocalFile(key, json.encode(_data))
-- end
-- )
-- local card_size = self._view:GetController('card_size') slider_sound.onChanged:Add(function()
-- json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'cardsize') -- GameApplication.Instance.SoundValue = slider_sound.value
-- if json_data == nil then -- btn_sound.selected = false
-- local _gamectr = self._gamectr -- GameApplication.Instance.SoundMute = false;
-- card_size.selectedIndex = 1 end)
-- else
-- local _data = json.decode(json_data)
-- local cardsize = _data['cardsize']
-- card_size.selectedIndex = cardsize btn_sound.onClick:Add(function()
-- end -- GameApplication.Instance.SoundMute = btn_sound.selected;
end)
-- card_size.onChanged:Set( btn_music.onClick:Add(function()
-- function() -- GameApplication.Instance.MusicMute = btn_music.selected;
-- if self.__changePokerSizeCallBack then end)
-- self.__changePokerSizeCallBack(card_size.selectedIndex)
-- end
-- --点击换牌按钮后保存当前游戏的牌
-- local user_id = DataManager.SelfUser.account_id
-- local _data = {}
-- _data['cardsize'] = card_size.selectedIndex
-- local key = user_id .. room.game_id .. 'cardsize'
-- Utils.SaveLocalFile(key, json.encode(_data))
-- end
-- )
-- self._view:GetChild('btn_close').onClick:Add( local _btn_logout = self._view:GetChild('btn_closeRoom')
-- function(...) _btn_logout.onClick:Set(function()
-- self:Destroy() if self._blur_view.dismiss_room_cd_time > 0 then
-- end ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
-- ) else
-- end local _gamectr = ControllerManager.GetController(GameController)
-- if self.isjiesan then _gamectr:AskDismissRoom()
-- self._view:GetChild('n82').visible = false end
-- end end)
end end
-- function M:Show() -- function M:Show()