跑得快显2,三张不带发送字段
parent
645e9a576b
commit
bd0feb2a37
|
|
@ -228,9 +228,10 @@ function M:SelectedConfigData()
|
||||||
_data["maxPlayers"] = peopleNum == 1 and 2 or 3 --人数 2是2人 3是三人
|
_data["maxPlayers"] = peopleNum == 1 and 2 or 3 --人数 2是2人 3是三人
|
||||||
_data["rule"] = wanfa1_5 == 0 and 2 or 1 --黑桃3必出 2是选择了该玩法 1是没有该玩法
|
_data["rule"] = wanfa1_5 == 0 and 2 or 1 --黑桃3必出 2是选择了该玩法 1是没有该玩法
|
||||||
_data["showlength"] = (showCardNum + 1) % 2 --显示手牌数量 0是不显示 1是显示
|
_data["showlength"] = (showCardNum + 1) % 2 --显示手牌数量 0是不显示 1是显示
|
||||||
_data["planelack"] = wanfa1_2 or wanfa1_1 --[[三张、飞机可少带接完 0是没有该玩法 1是有该玩法,
|
_data["planeNoBelt"] = wanfa1_1 --飞机不带
|
||||||
吴哥说这个玩法可能包含了三张、飞机可不带,没有告诉我添加字段,这个字段是飞机,下个字段是三带]]
|
_data["threeNoBelt"] = wanfa1_1 --三张不带
|
||||||
_data["threelack"] = wanfa1_2 or wanfa1_1
|
_data["planelack"] = wanfa1_2 --飞机可少带接完
|
||||||
|
_data["threelack"] = wanfa1_2 --三张可少带接完
|
||||||
_data["fourDaiThree"] = false --四带三 false没有该玩法 true有该玩法
|
_data["fourDaiThree"] = false --四带三 false没有该玩法 true有该玩法
|
||||||
if wanfa1_3 then
|
if wanfa1_3 then
|
||||||
_data["fourDaiThree"] = true
|
_data["fourDaiThree"] = true
|
||||||
|
|
|
||||||
|
|
@ -852,7 +852,6 @@ function M:GetHandCardPos(index, card_count)
|
||||||
local middle_x = self.cards_view.width / 2
|
local middle_x = self.cards_view.width / 2
|
||||||
local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2)
|
local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2)
|
||||||
x = start_x + (self.card_width + offset) * (index - 1)
|
x = start_x + (self.card_width + offset) * (index - 1)
|
||||||
print("================================GetHandCardPos", x, y)
|
|
||||||
return Vector2.New(x, y)
|
return Vector2.New(x, y)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ function RunFast_ResultView.new(blur_view, data, roomid, over, win_seat, dissolv
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
|
function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
|
||||||
|
|
||||||
ResultView.init(self, url, true)
|
ResultView.init(self, url, true)
|
||||||
self.xiPaiCtr = self._view:GetController("xipai")
|
self.xiPaiCtr = self._view:GetController("xipai")
|
||||||
|
|
||||||
|
|
@ -65,7 +64,6 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
|
||||||
|
|
||||||
self:InitData_One(data, win_seat, over, roomid, remaincards)
|
self:InitData_One(data, win_seat, over, roomid, remaincards)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ChangeCodeByTo(card)
|
function M:ChangeCodeByTo(card)
|
||||||
|
|
@ -79,7 +77,6 @@ end
|
||||||
|
|
||||||
-- 小结算
|
-- 小结算
|
||||||
function M:InitData_One(data, winseat, over, roomid, remaincards)
|
function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
|
|
||||||
local room = DataManager.CurrenRoom
|
local room = DataManager.CurrenRoom
|
||||||
self._view:GetController("sdk").selectedIndex = 1
|
self._view:GetController("sdk").selectedIndex = 1
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
|
@ -92,7 +89,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
if remaincards and #remaincards > 0 then
|
if remaincards and #remaincards > 0 then
|
||||||
table.sort(remaincards, function(a, b)
|
table.sort(remaincards, function(a, b)
|
||||||
return a % 100 < b % 100
|
return a % 100 < b % 100
|
||||||
|
|
||||||
end)
|
end)
|
||||||
for i = 1, #remaincards do
|
for i = 1, #remaincards do
|
||||||
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. remaincards[i])
|
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. remaincards[i])
|
||||||
|
|
@ -128,6 +124,7 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
for k = 1, #data[i].outCards do
|
for k = 1, #data[i].outCards do
|
||||||
local code = data[i].outCards[k]
|
local code = data[i].outCards[k]
|
||||||
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code)
|
local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/" .. code)
|
||||||
|
print("==================================================card_code_obj", card_code_obj, code)
|
||||||
leftCard:AddChild(card_code_obj)
|
leftCard:AddChild(card_code_obj)
|
||||||
card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7)
|
card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7)
|
||||||
end
|
end
|
||||||
|
|
@ -150,7 +147,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
-- body
|
-- body
|
||||||
nichen.text = tostring(player.nick)
|
nichen.text = tostring(player.nick)
|
||||||
else
|
else
|
||||||
|
|
||||||
nichen.text = tostring(player.self_user.nick_name)
|
nichen.text = tostring(player.self_user.nick_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -171,7 +167,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
local hp_nonnegative = room:checkHpNonnegative()
|
local hp_nonnegative = room:checkHpNonnegative()
|
||||||
local roundScore = player.winscore
|
local roundScore = player.winscore
|
||||||
if hp_nonnegative then
|
if hp_nonnegative then
|
||||||
|
|
||||||
local jifen = ""
|
local jifen = ""
|
||||||
if roundScore > 0 then
|
if roundScore > 0 then
|
||||||
jifen = "+" .. roundScore
|
jifen = "+" .. roundScore
|
||||||
|
|
@ -195,7 +190,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
|
|
||||||
item:GetChild("score").text = jifen .. tili .. limit
|
item:GetChild("score").text = jifen .. tili .. limit
|
||||||
else
|
else
|
||||||
|
|
||||||
local jifen = ""
|
local jifen = ""
|
||||||
if roundScore >= 0 then
|
if roundScore >= 0 then
|
||||||
jifen = "+" .. roundScore
|
jifen = "+" .. roundScore
|
||||||
|
|
@ -206,7 +200,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
|
|
||||||
local tili = ""
|
local tili = ""
|
||||||
if room.hpOnOff > 0 then
|
if room.hpOnOff > 0 then
|
||||||
|
|
||||||
local need = roundScore * rt
|
local need = roundScore * rt
|
||||||
tili = "("
|
tili = "("
|
||||||
if roundScore > 0 then
|
if roundScore > 0 then
|
||||||
|
|
@ -223,18 +216,15 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
end
|
end
|
||||||
|
|
||||||
if roundScore >= 0 then
|
if roundScore >= 0 then
|
||||||
|
|
||||||
if room.self_player.seat == player.seat then
|
if room.self_player.seat == player.seat then
|
||||||
-- body
|
-- body
|
||||||
self._view:GetController("result").selectedIndex = 1
|
self._view:GetController("result").selectedIndex = 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
if room.self_player.seat == player.seat then
|
if room.self_player.seat == player.seat then
|
||||||
self._view:GetController("result").selectedIndex = 0
|
self._view:GetController("result").selectedIndex = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -245,7 +235,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
self:Destroy()
|
self:Destroy()
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
_gamectr:ConformToNextGame()
|
_gamectr:ConformToNextGame()
|
||||||
|
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
self.xiPaiCtr.selectedIndex = 0
|
self.xiPaiCtr.selectedIndex = 0
|
||||||
|
|
@ -255,7 +244,6 @@ function M:InitData_One(data, winseat, over, roomid, remaincards)
|
||||||
self:InitData(data, winseat, roomid)
|
self:InitData(data, winseat, roomid)
|
||||||
-- ViewManager.ChangeView(ViewManager.View_Lobby)
|
-- ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -316,7 +304,8 @@ function M:InitData(data, winseat, roomid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list)
|
self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time,
|
||||||
|
player_list)
|
||||||
self:InitBigResult(room)
|
self:InitBigResult(room)
|
||||||
local big_result = self._view:GetChild("big_result")
|
local big_result = self._view:GetChild("big_result")
|
||||||
local lst_p = big_result:GetChild("player_list")
|
local lst_p = big_result:GetChild("player_list")
|
||||||
|
|
@ -329,7 +318,6 @@ function M:InitData(data, winseat, roomid)
|
||||||
tem:GetChild("txt_value").textFormat.size = 30
|
tem:GetChild("txt_value").textFormat.size = 30
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue