同步梭哈准备

master
罗家炜 2025-05-14 19:34:03 +08:00
parent 502962ae43
commit bbe7ec9901
4 changed files with 18 additions and 8 deletions

View File

@ -331,7 +331,7 @@ function M:OnEventPlayerReady(evt_data)
else
p.isSendCardState = false
end
print("lingmengOnEventPlayerReady")
DispatchEvent(self._dispatcher, GameEvent.PlayerReady, p)
end
)

View File

@ -607,6 +607,7 @@ function M:FillRoomConfig(roominfo_panel, _room)
end
function M:EventInit()
print("lingmengEventInit")
local _gamectr = self._gamectr
local _player_info = self._player_info
local _room = self._room
@ -850,24 +851,25 @@ function M:OnPlayerEnter(...)
end
function M:OnPlayerReady(...)
print("lingmengOnPlayerReady")
local arg = { ... }
local p = arg[1]
if p.isSendCardState ~= nil and p.isSendCardState == true then
p.isSendCardState = false
ControllerManager.IsSendCard = false
---- print("进入设置计时器控制==========")
print("进入设置计时器控制==========")
coroutine.start(function()
---- print("计时器倒计时5s=============")
print("计时器倒计时5s=============")
coroutine.wait(5)
---- print("当前状态==============")
---- print(ControllerManager.IsSendCard)
print("当前状态==============")
print(ControllerManager.IsSendCard)
if ControllerManager.IsSendCard == true then
---- print("以发送开牌======================")
print("以发送开牌======================")
return
else
---- print("开始断线重连")
--ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
print("开始断线重连")
ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
ViewManager.refreshGameView()
end
ControllerManager.IsSendCard = false

View File

@ -206,6 +206,7 @@ function M:UpdateLineState(state)
end
function M:Ready(isread)
print("lingmengReady")
self._ctr_read.selectedIndex = isread and 1 or 0
end

View File

@ -277,10 +277,17 @@ function M:OnPlayerEnter(...)
end
function M:OnPlayerReady(...)
print('thislingmengOnPlayerReady')
local arg = { ... }
local p = arg[1]
local _room = self._room
local _player_info = self._player_info
if p.seat == _room.self_player.seat then
self._ctr_action.selectedIndex = 0
end
local info = _player_info[self:GetPos(p.seat)]
info:Ready(true)
end
function M:OnPlayerLeave(...)