同步46.45
parent
6ad0b67cf6
commit
9cef826299
|
|
@ -282,7 +282,7 @@ end
|
||||||
|
|
||||||
-- 玩家进
|
-- 玩家进
|
||||||
function M:OnEventPlayerEnter(evt_data)
|
function M:OnEventPlayerEnter(evt_data)
|
||||||
---- print("进入房间++++++++++++++++++++++++++++++++++++++")
|
print("进入房间++++++++++++++++++++++++++++++++++++++")
|
||||||
self._cacheEvent:Enqueue(
|
self._cacheEvent:Enqueue(
|
||||||
function()
|
function()
|
||||||
local p = self._room:NewPlayer()
|
local p = self._room:NewPlayer()
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,13 @@ end
|
||||||
-- end
|
-- end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
function M:InitData(over, room, result, total_result, callback)
|
function M:InitData(over, room, result, total_result, callback, isWitness, witnessCallbak)
|
||||||
-- print("===============================InitData===========================", over, room, result, total_result)
|
-- print("===============================InitData===========================", over, room, result, total_result)
|
||||||
-- pt(room)
|
-- pt(room)
|
||||||
-- pt(result)
|
-- pt(result)
|
||||||
-- Pt(total_result)
|
-- Pt(total_result)
|
||||||
self._callback = callback
|
self._callback = callback
|
||||||
|
self._witnessCallbak = witnessCallbak
|
||||||
local showClearMainBtn = self._view:GetChild("btn_showClearMain")
|
local showClearMainBtn = self._view:GetChild("btn_showClearMain")
|
||||||
local nextRoundBtn = self._view:GetChild("btn_nextRound")
|
local nextRoundBtn = self._view:GetChild("btn_nextRound")
|
||||||
local nextRoundBtn2 = self._view:GetChild("Btn_NextRound2")
|
local nextRoundBtn2 = self._view:GetChild("Btn_NextRound2")
|
||||||
|
|
@ -55,9 +56,16 @@ function M:InitData(over, room, result, total_result, callback)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
nextRoundBtn.onClick:Set(function()
|
nextRoundBtn.onClick:Set(function()
|
||||||
|
if isWitness and isWitness == 1 then
|
||||||
|
if self._witnessCallbak then
|
||||||
|
self._witnessCallbak()
|
||||||
|
end
|
||||||
|
self:DestroyWithCallback()
|
||||||
|
else
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
_gamectr:PlayerReady()
|
_gamectr:PlayerReady()
|
||||||
self:DestroyWithCallback()
|
self:DestroyWithCallback()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -71,9 +79,16 @@ function M:InitData(over, room, result, total_result, callback)
|
||||||
_overCtr.selectedIndex = 0
|
_overCtr.selectedIndex = 0
|
||||||
self:fillResult0(room, peopleNum, result)
|
self:fillResult0(room, peopleNum, result)
|
||||||
nextRoundBtn2.onClick:Set(function()
|
nextRoundBtn2.onClick:Set(function()
|
||||||
|
if isWitness and isWitness == 1 then
|
||||||
|
if self._witnessCallbak then
|
||||||
|
self._witnessCallbak()
|
||||||
|
end
|
||||||
|
self:DestroyWithCallback()
|
||||||
|
else
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
_gamectr:PlayerReady()
|
_gamectr:PlayerReady()
|
||||||
self:DestroyWithCallback()
|
self:DestroyWithCallback()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
elseif over == 1 then
|
elseif over == 1 then
|
||||||
showBtnTypeCtr.selectedIndex = 1
|
showBtnTypeCtr.selectedIndex = 1
|
||||||
|
|
|
||||||
|
|
@ -476,6 +476,7 @@ function M:EventInit()
|
||||||
self._clearingView:InitData(0, _room, result, nil, function(...)
|
self._clearingView:InitData(0, _room, result, nil, function(...)
|
||||||
for i = 1, #data do
|
for i = 1, #data do
|
||||||
local p = _room:GetPlayerBySeat(data[i].seat)
|
local p = _room:GetPlayerBySeat(data[i].seat)
|
||||||
|
if p then
|
||||||
p.total_score = data[i].total_score
|
p.total_score = data[i].total_score
|
||||||
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
||||||
local info = self._player_info[self:GetPos(p.seat)]
|
local info = self._player_info[self:GetPos(p.seat)]
|
||||||
|
|
@ -499,6 +500,7 @@ function M:EventInit()
|
||||||
info._view:GetController("piao_niao").selectedIndex = 0
|
info._view:GetController("piao_niao").selectedIndex = 0
|
||||||
p.fz_list = {}
|
p.fz_list = {}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
DataManager.CurrenRoom.self_player.card_list = {}
|
DataManager.CurrenRoom.self_player.card_list = {}
|
||||||
self._state.selectedIndex = 2
|
self._state.selectedIndex = 2
|
||||||
self._clearingView = nil
|
self._clearingView = nil
|
||||||
|
|
|
||||||
|
|
@ -256,6 +256,7 @@ function M:EventInit()
|
||||||
self._clearingView:InitData(0, _room, result, nil, function(...)
|
self._clearingView:InitData(0, _room, result, nil, function(...)
|
||||||
for i = 1, #data do
|
for i = 1, #data do
|
||||||
local p = _room:GetPlayerBySeat(data[i].seat)
|
local p = _room:GetPlayerBySeat(data[i].seat)
|
||||||
|
if p then
|
||||||
p.total_score = data[i].total_score
|
p.total_score = data[i].total_score
|
||||||
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
local card_info = self._player_card_info[self:GetPos(p.seat)]
|
||||||
local info = self._player_info[self:GetPos(p.seat)]
|
local info = self._player_info[self:GetPos(p.seat)]
|
||||||
|
|
@ -279,10 +280,11 @@ function M:EventInit()
|
||||||
info._view:GetController("piao_niao").selectedIndex = 0
|
info._view:GetController("piao_niao").selectedIndex = 0
|
||||||
p.fz_list = {}
|
p.fz_list = {}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
DataManager.CurrenRoom.self_player.card_list = {}
|
DataManager.CurrenRoom.self_player.card_list = {}
|
||||||
self._state.selectedIndex = 2
|
self._ctr_state.selectedIndex = 2
|
||||||
self._clearingView = nil
|
self._clearingView = nil
|
||||||
end)
|
end, 1)
|
||||||
end
|
end
|
||||||
print("lingmeng witness ZPResult3")
|
print("lingmeng witness ZPResult3")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -229,5 +229,9 @@
|
||||||
<group id="n168_qz7i" name="showNext" xy="-125,-102" size="2832,1436" advanced="true">
|
<group id="n168_qz7i" name="showNext" xy="-125,-102" size="2832,1436" advanced="true">
|
||||||
<gearDisplay controller="showNext" pages="1"/>
|
<gearDisplay controller="showNext" pages="1"/>
|
||||||
</group>
|
</group>
|
||||||
|
<graph id="n182_kw9h" name="n182" xy="874,1024" size="784,100" type="rect" lineSize="0" fillColor="#4c000000"/>
|
||||||
|
<text id="n181_kw9h" name="n181" xy="1114,1035" size="304,79" fontSize="60" color="#ffffff" text="正在旁观中">
|
||||||
|
<gearDisplay controller="state" pages="4"/>
|
||||||
|
</text>
|
||||||
</displayList>
|
</displayList>
|
||||||
</component>
|
</component>
|
||||||
Binary file not shown.
Loading…
Reference in New Issue