同步梭哈准备
parent
502962ae43
commit
bbe7ec9901
|
|
@ -331,7 +331,7 @@ function M:OnEventPlayerReady(evt_data)
|
||||||
else
|
else
|
||||||
p.isSendCardState = false
|
p.isSendCardState = false
|
||||||
end
|
end
|
||||||
|
print("lingmengOnEventPlayerReady")
|
||||||
DispatchEvent(self._dispatcher, GameEvent.PlayerReady, p)
|
DispatchEvent(self._dispatcher, GameEvent.PlayerReady, p)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -607,6 +607,7 @@ function M:FillRoomConfig(roominfo_panel, _room)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:EventInit()
|
function M:EventInit()
|
||||||
|
print("lingmengEventInit")
|
||||||
local _gamectr = self._gamectr
|
local _gamectr = self._gamectr
|
||||||
local _player_info = self._player_info
|
local _player_info = self._player_info
|
||||||
local _room = self._room
|
local _room = self._room
|
||||||
|
|
@ -850,24 +851,25 @@ function M:OnPlayerEnter(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:OnPlayerReady(...)
|
function M:OnPlayerReady(...)
|
||||||
|
print("lingmengOnPlayerReady")
|
||||||
local arg = { ... }
|
local arg = { ... }
|
||||||
local p = arg[1]
|
local p = arg[1]
|
||||||
|
|
||||||
if p.isSendCardState ~= nil and p.isSendCardState == true then
|
if p.isSendCardState ~= nil and p.isSendCardState == true then
|
||||||
p.isSendCardState = false
|
p.isSendCardState = false
|
||||||
ControllerManager.IsSendCard = false
|
ControllerManager.IsSendCard = false
|
||||||
---- print("进入设置计时器控制==========")
|
print("进入设置计时器控制==========")
|
||||||
coroutine.start(function()
|
coroutine.start(function()
|
||||||
---- print("计时器倒计时5s=============")
|
print("计时器倒计时5s=============")
|
||||||
coroutine.wait(5)
|
coroutine.wait(5)
|
||||||
---- print("当前状态==============")
|
print("当前状态==============")
|
||||||
---- print(ControllerManager.IsSendCard)
|
print(ControllerManager.IsSendCard)
|
||||||
if ControllerManager.IsSendCard == true then
|
if ControllerManager.IsSendCard == true then
|
||||||
---- print("以发送开牌======================")
|
print("以发送开牌======================")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
---- print("开始断线重连")
|
print("开始断线重连")
|
||||||
--ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
|
ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
|
||||||
ViewManager.refreshGameView()
|
ViewManager.refreshGameView()
|
||||||
end
|
end
|
||||||
ControllerManager.IsSendCard = false
|
ControllerManager.IsSendCard = false
|
||||||
|
|
|
||||||
|
|
@ -206,6 +206,7 @@ function M:UpdateLineState(state)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:Ready(isread)
|
function M:Ready(isread)
|
||||||
|
print("lingmengReady")
|
||||||
self._ctr_read.selectedIndex = isread and 1 or 0
|
self._ctr_read.selectedIndex = isread and 1 or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -277,10 +277,17 @@ function M:OnPlayerEnter(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:OnPlayerReady(...)
|
function M:OnPlayerReady(...)
|
||||||
|
print('thislingmengOnPlayerReady')
|
||||||
local arg = { ... }
|
local arg = { ... }
|
||||||
local p = arg[1]
|
local p = arg[1]
|
||||||
local _room = self._room
|
local _room = self._room
|
||||||
local _player_info = self._player_info
|
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
|
end
|
||||||
|
|
||||||
function M:OnPlayerLeave(...)
|
function M:OnPlayerLeave(...)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue