重连跟新手牌梭哈

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
if player.seat == self._room.self_player.seat then
player_card_info:InitPoker(player.hand_list, false)
else
player_card_info:UpdateHandPoker(player.hand_list, false, true)
end
-- if player.seat == self._room.self_player.seat then
-- player_card_info:InitPoker(player.hand_list, false)
-- else
-- player_card_info:UpdateHandPoker(player.hand_list, false, true)
-- end
player_card_info:UpdateHandPoker(player.hand_list)
-- if player.out_card_list[1] == 0 then
-- player_card_info:SetOutCardInfo(nil, false)
-- else

View File

@ -32,76 +32,46 @@ function PKSettingView.new(blur_view, show_type, isjiesan, url, cardSizeHandle)
end
function M:init(url)
SettingView.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']
BaseWindow.init(self, url)
-- c1.selectedIndex = pai
-- end
local view = self._view
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(
-- function()
-- if self.__changePokerCallBack then
-- self.__changePokerCallBack(c1.selectedIndex)
-- 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
-- )
slider_music.onChanged:Add(function()
-- GameApplication.Instance.MusicValue = slider_music.value
-- btn_music.selected = false
-- GameApplication.Instance.MusicMute = false;
end)
-- local card_size = self._view:GetController('card_size')
-- json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'cardsize')
-- if json_data == nil then
-- local _gamectr = self._gamectr
-- card_size.selectedIndex = 1
-- else
-- local _data = json.decode(json_data)
-- local cardsize = _data['cardsize']
slider_sound.onChanged:Add(function()
-- GameApplication.Instance.SoundValue = slider_sound.value
-- btn_sound.selected = false
-- GameApplication.Instance.SoundMute = false;
end)
-- card_size.selectedIndex = cardsize
-- end
btn_sound.onClick:Add(function()
-- GameApplication.Instance.SoundMute = btn_sound.selected;
end)
-- card_size.onChanged:Set(
-- function()
-- if self.__changePokerSizeCallBack then
-- 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
-- )
btn_music.onClick:Add(function()
-- GameApplication.Instance.MusicMute = btn_music.selected;
end)
-- self._view:GetChild('btn_close').onClick:Add(
-- function(...)
-- self:Destroy()
-- end
-- )
-- end
-- if self.isjiesan then
-- self._view:GetChild('n82').visible = false
-- end
local _btn_logout = self._view:GetChild('btn_closeRoom')
_btn_logout.onClick:Set(function()
if self._blur_view.dismiss_room_cd_time > 0 then
ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!")
else
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:AskDismissRoom()
end
end)
end
-- function M:Show()