未完成,上传保存

master
罗家炜 2025-04-02 19:03:26 +08:00
parent 948bd04300
commit 8515e03703
14 changed files with 1176 additions and 915 deletions

View File

@ -51,7 +51,6 @@ function M:SetTuoGuanState()
else
end
end
ControllerManager.enterPlayerData = nil
end
@ -120,7 +119,8 @@ function M:InitView(url, isHideIpAdds)
self.distance_view = PlayerDistanceView.new(false, self._gps_style, function(v)
self:continue_game(v)
end)
self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and self._state.selectedIndex < 3 and 1 or 0
self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and
self._state.selectedIndex < 3 and 1 or 0
self.distance_view:Show()
end)
end
@ -232,18 +232,18 @@ function M:InitView(url, isHideIpAdds)
self._gamectr:PlayerReady()
end)
local btn_xipai = _view:GetChild('btn_xipai')
if btn_xipai then
btn_xipai.onClick:Set(function()
self._gamectr:PlayerXiPai()
end)
end
-- local btn_xipai = _view:GetChild('btn_xipai')
-- if btn_xipai then
-- btn_xipai.onClick:Set(function()
-- self._gamectr:PlayerXiPai()
-- end)
-- end
local btn_start = _view:GetChild('btn_start')
btn_start.onClick:Set(function()
self._gamectr:StartGame()
end)
-- local btn_start = _view:GetChild('btn_start')
-- btn_start.onClick:Set(function()
-- self._gamectr:StartGame()
-- end)
local _btn_wxyqhy = _view:GetChild('btn_wxyqhy')
if _btn_wxyqhy then
@ -350,7 +350,6 @@ function M:InitView(url, isHideIpAdds)
-- 显示牌友圈助手
if self._room.group_id ~= 0 and not self._hide_assist then
local bShow = true
local l_groups = DataManager.groups
local group = l_groups:get(self._room.group_id)
@ -363,7 +362,6 @@ function M:InitView(url, isHideIpAdds)
if bShow then
--self:ShowFGAssist()
end
end
if self._room.self_player.entrust then
self:MarkSelfTuoguan()
@ -382,11 +380,6 @@ function M:InitView(url, isHideIpAdds)
)
end
end--]]
end
function M:continue_game(continue)
@ -453,7 +446,6 @@ function M:ShowFGAssist()
btn_assist.x = 40
else
btn_assist.x = (GRoot.inst.width - 1334) * -0.5 + 40
end
btn_assist.y = panel_assist._root_view.height / 3 - 0.5 * btn_assist.height
@ -685,11 +677,8 @@ function M:EventInit()
if info and info.SetShowTGTips then
info:SetShowTGTips(arg[2], arg[3])
end
end
)
end
-- 设置能否互动,1允许,0禁止
@ -791,7 +780,8 @@ function M:OnPlayerEnter(...)
self.distance_view = PlayerDistanceView.new(true, self._gps_style, function(v)
self:continue_game(v)
end)
self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and self._state.selectedIndex < 3 and 1 or 0
self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and
self._state.selectedIndex < 3 and 1 or 0
self.distance_view:Show()
if self.btn_distance then
self.btn_distance:GetController("state").selectedIndex = 1
@ -1067,9 +1057,11 @@ function M:OnUpdate()
self:OnMuShiUpdate()
end
end
function M:onLeftTimeOver()
end
function M:Clear()
-- self:__CloseTip()
for i = 1, #self._player_info do
@ -1077,14 +1069,12 @@ function M:Clear()
end
end
function M:DestroyPlayerInfo()
for i = 1, #self._player_info do
self._player_info[i]:Destroy()
end
end
function M:GetPos(seat)
return ViewUtil.GetPos(self._room.self_player.seat, seat, self._room.room_config.people_num)
end
@ -1124,7 +1114,8 @@ function M:Show()
self.distance_view = PlayerDistanceView.new(true, self._gps_style, function(v)
self:continue_game(v)
end)
self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and self._state.selectedIndex < 3 and 1 or 0
self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and
self._state.selectedIndex < 3 and 1 or 0
self.distance_view:Show()
self.btn_distance:GetController("state").selectedIndex = 1
end
@ -1148,5 +1139,4 @@ function M:Destroy()
BaseView.Destroy(self)
BaseWindow.DestroyAll()
ResourcesManager.UnLoadGroup('base_chat')
end

View File

@ -0,0 +1,317 @@
---
local PlayerInfoView = {
_view = nil,
_main_view = nil,
_tex_player_name = nil,
_tex_player_id = nil,
_tex_score = nil,
_ctr_offline = nil,
_ctr_bank = nil,
_ctr_room_owner = nil,
_ctr_mask_voice = nil,
_btn_head = nil,
_biaoqing = nil,
_chat = nil,
_player = nil,
__runwait_voice = nil,
_isHideIpAdds = false
}
local M = PlayerInfoView
function M.new(view, main_view, isHideIpAdds)
local self = {}
setmetatable(self, { __index = PlayerInfoView })
self._view = view
self._main_view = main_view
self._isHideIpAdds = isHideIpAdds
self.isShowTGTimer = false
self.currentTime = 0
self.totalTime = 0
--self.isShow = fasle
self:init()
return self
end
function M:init()
local view = self._view
UIPackage.AddPackage('base/chat/ui/Chat')
self._tex_player_name = view:GetChild('name')
self._biaoqing = view:GetChild('face')
self._chat = view:GetChild('chat')
self._ctr_read = view:GetController('read')
self._ctr_offline = view:GetController('offline')
self._btn_head = view:GetChild('btn_head')
self._ctr_bank = view:GetController('bank')
self._ctr_room_owner = view:GetController('room_owner')
self._ctr_mask_voice = view:GetController('mask_voice')
self._ctr_dismiss_room = view:GetController('dismiss_room')
self.PlayerTGTips = view:GetChild('tuoguanTips')
if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then
self.PlayerTGTips.displayObject.gameObject:SetActive(false)
end
end
function M:IsShowTGTips(isShow, time)
--printlog("isShowisShowisShow==== ",isShow," time ",time)
if time == nil then time = 0 end
self.isShowTGTimer = isShow
if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then
self.PlayerTGTips.displayObject.gameObject:SetActive(isShow)
end
self.currentTime = 0
if isShow then
if self.PlayerTGTips then
self.PlayerTGTips.text = "开启托管剩余时间" .. time .. "s"
end
self.totalTime = time
TimerManager.AddTimer(self.OnUpdate, self)
else
TimerManager.RemoveTimer(self.OnUpdate, self)
end
end
function M:OnUpdate()
--printlog("OnUpdate=====================")
if self.isShowTGTimer then
self.currentTime = self.currentTime + Time.deltaTime
if self.currentTime >= 1 then
self.currentTime = 0
self.totalTime = self.totalTime - 1
--printlog("当前计时器===>>>",self.totalTime)
if self.PlayerTGTips then
self.PlayerTGTips.text = "开启托管剩余时间" .. self.totalTime .. "s"
end
if self.totalTime <= 0 then
self.isShowTGTimer = false
if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then
self.PlayerTGTips.displayObject.gameObject:SetActive(false)
end
end
end
if self.muShiPlayerUpdate then
self:muShiPlayerUpdate()
end
end
end
function M:FillData(player)
self._player = player
if player == nil then
return
end
local isHidden = false
local room = DataManager.CurrenRoom
if room and room.playback ~= true and room.room_config and room.room_config.isHidden then
isHidden = room.room_config.isHidden == 1
end
if isHidden == false then
ImageLoad.Load(player.self_user.head_url, self._btn_head._iconObject)
self._btn_head.onClick:Set(
function()
--local headView = HeadView.new(self._main_view._root_view, player.self_user, self._isHideIpAdds)
--headView:Show()
end
)
else
local ctr = self._btn_head:GetController("hidden")
if ctr then
ctr.selectedIndex = 1
end
end
print("============================playinfoview")
pt(player)
if isHidden
--and player.self_user.account_id ~= room.self_player.self_user.account_id
then
if player.orgSeat and player.orgSeat > 0 then
self._tex_player_name.text = "玩家" .. player.orgSeat
else
self._tex_player_name.text = "玩家" .. player.seat
player.orgSeat = membe_clone(player.seat)
end
if self._tex_player_id then
self._tex_player_id.text = ""
end
else
self._tex_player_name.text = player.self_user.nick_name
if self._tex_player_id then
self._tex_player_id.text = "ID:" .. player.self_user.account_id
end
end
self._ctr_room_owner.selectedIndex = room.owner_id == player.self_user.account_id and 1 or 0
if (DataManager.CurrenRoom.self_player ~= player) then
self._ctr_offline.selectedIndex = player.line_state == 0 and 1 or 0
end
-- self:UpdateScore()
self:Ready(player.ready)
if player.entrust and player ~= room.self_player then
self:MarkTuoguan()
end
end
function M:DismissRoom(state)
state = state or false
self._ctr_dismiss_room.selectedIndex = state == true and 1 or 0
end
function M:UpdateLineState(state)
self._ctr_offline.selectedIndex = state == 0 and 1 or 0
end
function M:Ready(isread)
self._ctr_read.selectedIndex = isread and 1 or 0
end
function M:MarkBank(isbank)
self._ctr_bank.selectedIndex = isbank and 1 or 0
end
-- 表情 语音
function M:ShowInteraction(type, str)
if type == 3 then
Voice.DownLoad(
str,
function(clip)
if (clip) then
self:ShowMaskVoice(clip.length)
GameApplication.Instance:PlayVoice(clip)
end
end
)
elseif type == 4 then
self:SetChat(str)
elseif type == 2 then
local chat_index = tonumber(str)
self._main_view:PlayChatSound(self._player.self_user.sex, chat_index)
local language, index = self._main_view:GetChatMsgLanguage(chat_index)
if language ~= 0 then
local msgs = self._main_view['Fix_Msg_Chat' .. language + 1]
self:SetChat(msgs[index])
else
self:SetChat(self._main_view.Fix_Msg_Chat[chat_index])
end
elseif type == 1 then
self:SetBiaoqing('ui://Chat/' .. str)
end
end
function M:SetBiaoqing(url)
if (self.__runwait_biaoqing ~= nil) then
if self._biaoqing.numChildren > 0 then
self._biaoqing:RemoveChildAt(0, true)
end
coroutine.stop(self.__runwait_biaoqing)
end
self._biaoqing.alpha = 1
local bq = UIPackage.CreateObjectFromURL(url)
self._biaoqing:AddChild(bq)
bq:Center()
-- self._biaoqing:GetChild("n1").icon = url
self.__runwait_biaoqing = nil
self.__runwait_biaoqing = coroutine.start(self.__WaitBiaoqing, self)
end
function M:__WaitBiaoqing()
coroutine.wait(2)
self._biaoqing.alpha = 0
-- self._biaoqing:GetChild("n1").icon = nil
self._biaoqing:GetChildAt(0):Dispose()
end
function M:SetChat(msg)
-- body
self._chat.alpha = 1
self._chat:GetChild('title').text = msg
if (self.__runwait_chat ~= nil) then
coroutine.stop(self.__runwait_chat)
end
self.__runwait_chat = nil
self.__runwait_chat = coroutine.start(self.__WaitChat, self)
end
function M:__WaitChat()
coroutine.wait(2)
self._chat.alpha = 0
self._chat:GetChild('title').text = ''
end
function M:ShowMaskVoice(time, mask)
mask = mask or true
GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic + 1
if (mask) then
self._ctr_mask_voice.selectedIndex = 1
end
if (self.__runwait_voice ~= nil) then
coroutine.stop(self.__runwait_voice)
GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1
end
self.__runwait_voice = nil
self.__runwait_voice = coroutine.start(self.__WaitMaskVoice, self, time)
end
function M:__WaitMaskVoice(time)
coroutine.wait(time)
self._ctr_mask_voice.selectedIndex = 0
self.__runwait_voice = nil
GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1
end
function M:GetHeadCenter()
local btn_head = self._view:GetChild('btn_head')
local pt = Vector2(btn_head.x + 1 / 2 * btn_head.width, btn_head.y + 1 / 2 * btn_head.height)
return pt
end
-- 添加、移除托管标记
function M:MarkTuoguan()
local com_tuoguan = UIPackage.CreateObjectFromURL('ui://Common/com_tuoguan')
self:AddMarkToHead(com_tuoguan, 'mark_tuoguan')
end
function M:UnmarkTuoguan()
self:RemoveMarkFromHead('mark_tuoguan')
end
-- 动态的往头像上加载组件
function M:AddMarkToHead(com, key)
if key then
if self[key] then
self[key]:Dispose()
end
self[key] = com
end
self._view:AddChild(com)
com.touchable = false
com.xy = self:GetHeadCenter()
end
-- 动态移除组件
function M:RemoveMarkFromHead(key)
if self[key] then
self[key]:Dispose()
self[key] = nil
end
end
function M:Destroy()
self.isShowTGTimer = false
TimerManager.RemoveTimer(self.OnUpdate, self)
self.OnUpdate = nil
self.muShiPlayerUpdate = nil
end
return M

View File

@ -46,7 +46,9 @@ function M:InitView(url)
self._full = true
-- self.Fix_Msg_Chat = Fix_Msg_Chat
UIPackage.AddPackage("extend/majiang/changsha/ui/Extend_MJ_ChangSha")
MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2")
MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
-- MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2")
self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人长麻 ' .. room.score_times .. ''
@ -70,7 +72,6 @@ function M:InitView(url)
end
end
function M:NewMJPlayerCardInfoView(view, index)
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
@ -92,12 +93,10 @@ function M:EventInit()
local currentPlayer2 = arg[2]
self._popEvent = false
if (currentPlayer1) then
local xipaiCB = function()
self._popEvent = true
end
self:PlayXiPai(xipaiCB)
end
@ -108,8 +107,6 @@ function M:EventInit()
end
self:PlayXiPai1(xipaiCB2)
end
end)
_gamectr:AddEventListener(CS_GameEvent.SendCards, function(...)
@ -345,7 +342,7 @@ function M:EventInit()
if _room:checkHpNonnegative() then
p.cur_hp = data[i].hp_info.cur_hp
end
info:UpdateScore()
-- info:UpdateScore()
info._view:GetChild("zhanji").visible = true
local num = data[i].hp_info.total_hp
if num > 0 then
@ -440,7 +437,6 @@ function M:EventInit()
end)
_gamectr:AddEventListener(CS_GameEvent.EventKaiGang, function(...)
local arg = { ... }
local data = arg[1]
local outlist = arg[2]
@ -518,8 +514,8 @@ function M:EventInit()
end
function M:UpdateRound()
self._view:GetChild("tex_round1").text = self._room.curren_round
self._view:GetChild("tex_round2").text = self._room.room_config.round
self._view:GetChild("text_round").text = string.format("当前局数:%d/%d", self._room.curren_round,
self._room.room_config.round)
end
function M:InitPlayerInfoView()
@ -644,7 +640,8 @@ function M:_ChiView(tiplist, callback)
local list_choose1 = _pop_tip_choice:GetChild("Lst_choose")
local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2")
local crossCtr = _pop_tip_choice:GetController("state")
crossCtr.selectedIndex = #tiplist == 3 and 0 or (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4)))
crossCtr.selectedIndex = #tiplist == 3 and 0 or
(#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4)))
_pop_tip_choice:GetChild("Btn_cross").onClick:Add(function()
_pop_tip_choice:Dispose()
self._chipeng_tip.visible = true
@ -657,7 +654,8 @@ function M:_ChiView(tiplist, callback)
item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0
if tiplist[i].weight ~= 1 then
for j = 1, 4 do
item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tiplist[i].card)
item_choose:GetChild("card" .. j).icon = UIPackage.GetItemURL("Main_Majiang",
self:GetPrefix() .. "202_" .. tiplist[i].card)
end
else
local tem = {}
@ -668,9 +666,12 @@ function M:_ChiView(tiplist, callback)
table.sort(tem, function(a, b)
return a < b
end)
item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[1])
item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[2])
item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[3])
item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" ..
tem[1])
item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" ..
tem[2])
item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" ..
tem[3])
local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2)
item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1
end
@ -678,7 +679,8 @@ function M:_ChiView(tiplist, callback)
callback(tiplist[i].id)
end)
end
_pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2)
_pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2,
(self._view.height - _pop_tip_choice.height) / 2)
self._view:AddChild(_pop_tip_choice)
self._pop_tip_choice = _pop_tip_choice
end
@ -791,7 +793,6 @@ function M:__QsHu(data)
end)
end
function M:ClearQSHTips()
if self.QSHList and #self.QSHList > 0 then
for i = 1, #self.QSHList do
@ -801,7 +802,6 @@ function M:ClearQSHTips()
end
end
function M:__KaiGang(data)
local seat = data["seat"]
local kg_info = data["info"]
@ -877,7 +877,6 @@ function M:__Haidi()
self._com_haidi = item
end
function M:__PiaoNiaoTip()
local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao")
self._view:AddChild(obj_piao)
@ -894,7 +893,6 @@ function M:__PiaoNiaoTip()
self._com_piao = obj_piao
end
function M:__PiaoNiaoTip1()
local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao")
self._view:AddChild(obj_piao)
@ -915,7 +913,6 @@ function M:__PiaoNiaoTip1()
self._gamectr:SendAction(i - 1)
obj_piao:Dispose()
end)
end
self._com_piao = obj_piao
@ -933,7 +930,6 @@ function M:__PiaoNiaoTip1()
end
piaoState.selectedIndex = 2
end
end
function M:OnFangziAction(...)
@ -1041,7 +1037,6 @@ function M:ReloadRoom(bskip)
self._state.selectedIndex = 1
self._room._reload_flag = true
end
end
if room.kg_card and #room.kg_card ~= 0 then
@ -1057,7 +1052,6 @@ function M:ReloadRoom(bskip)
local p = room.player_list[i]
local info = self._player_card_info[self:GetPos(p.seat)]
local head_info = self._player_info[self:GetPos(p.seat)]
head_info:UpdateScore()
head_info._view:GetChild('zhanji').visible = true
local num = p.total_hp or 0
if num > 0 then

View File

@ -1,4 +1,4 @@
local PlayerInfoView = require("Game.View.PlayerInfoView")
local PlayerInfoView = require("Game.View.PlayerInfoView copy")
local M = {}
@ -13,9 +13,6 @@ end
function M:init()
PlayerInfoView.init(self)
self._tex_score = self._view:GetChild("info"):GetChild("tex_score1")
self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2")
self._ct_score = self._view:GetChild("info"):GetController("score")
end
function M:ShowInteraction(type, str)
@ -49,28 +46,6 @@ end
function M:FillData(player)
PlayerInfoView.FillData(self, player)
self:UpdateScore(player.total_score)
end
function M:UpdateScore()
local score = self._player.total_score
local room = DataManager.CurrenRoom
if room:checkHpNonnegative() then
score = d2ad(self._player.cur_hp)
end
if not score then
score = 0
end
if score < 0 then
self._ct_score.selectedIndex = 1
self._tex_score2.text = score
else
self._ct_score.selectedIndex = 0
if not room:checkHpNonnegative() then
score = "+" .. score
end
self._tex_score.text = score
end
end
return M

View File

@ -56,6 +56,7 @@ function M:UpdateHandCard(getcard, mp, opcard)
opnum = #opcard
end
local loc = 0
print("===============================UpdateHandCard", getcard, mp, opcard, comp)
if not mp then
local comp_back = handcard_list["comp_back"]
if self._current_card_type == 2 then

View File

@ -109,6 +109,7 @@ function M:FillRoomData(s2croom)
p.fz_list[#p.fz_list + 1] = fz
end
if not playing and room.curren_round > 0 then
print("=======================在此进入")
self.GetGameController():PlayerReady()
end
end

View File

@ -109,6 +109,7 @@ function M:FillRoomData(s2croom)
p.fz_list[#p.fz_list + 1] = fz
end
if not playing and room.curren_round > 0 then
print("=======================================自动开始")
self.GetGameController():PlayerReady()
end
end

View File

@ -28,7 +28,6 @@ function M:InitView(url, use_custom_bg)
self._room.card_type = DataManager.CardTypeList[tostring(self._room.game_id)] or 1
UIPackage.AddPackage("base/main_majiang/ui/Main_Majiang")
MainView.InitView(self, url)
local _view = self._view
self._cursor = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Ani_play_bj")
@ -72,7 +71,6 @@ function M:InitView(url, use_custom_bg)
local _gamectr = ControllerManager.GetController(GameController)
_gamectr:AskDismissRoom()
end
end)
@ -102,7 +100,6 @@ function M:InitView(url, use_custom_bg)
end
for i = 1, #_room.player_list do
local p = _room.player_list[i]
local zi, icon = self:GetPosString(p.seat)
if self._room.card_type == 2 then
@ -124,7 +121,6 @@ function M:InitView(url, use_custom_bg)
else
self._ctr_action.selectedIndex = 2
end
else
self._ctr_action.selectedIndex = 1
end
@ -136,7 +132,6 @@ function M:InitView(url, use_custom_bg)
self:InitXiPai1()
end
function M:InitXiPai()
self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handanim")
self._xipaiPanel.visible = false
@ -153,7 +148,6 @@ function M:InitXiPai()
--self:PlayXiPai()
end
function M:InitXiPai1()
self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handanim02")
self._xipaiPanel1.visible = false
@ -169,7 +163,6 @@ function M:InitXiPai1()
self._handAnimCtr1.selectedIndex = 0
end
function M:PlayXiPai(xipaiCallBack)
if self._xipaiPanel then
coroutine.start(function()
@ -183,8 +176,6 @@ function M:PlayXiPai(xipaiCallBack)
xipaiCallBack()
end
end)
end
end
@ -201,25 +192,20 @@ function M:PlayXiPai1(xipaiCallBack)
xipaiCallBack()
end
end)
end
end
function M:EventInit()
MainView.EventInit(self)
end
function M:Change3d(flag)
local _room = self._room
local _view = self._view
local _cardbox = _view:GetChild("cardbox")
for i = 1, #_room.player_list do
local p = _room.player_list[i]
local zi, icon = self:GetPosString(p.seat)
if self._room.card_type == 2 then
@ -232,7 +218,6 @@ function M:Change3d(flag)
-- 如果要切换3d牌桌的cardbox位置及上方文字(剩余牌,回合数)显示不错乱,需要做以下改动
-- 取消文字组合的3d控制器的位置 并设置对cardbox的关联左左顶顶
if flag == true then
if _view:GetController("3d") ~= nil then
_view:GetController("3d").selectedIndex = 1
_cardbox.x = (_view.width - _cardbox.width) * 0.5
@ -316,7 +301,6 @@ function M:GetIndex(seat)
end
function M:GetPosString(seat)
if DataManager.CurrenRoom.room_config.people_num == 4 then
if seat == 1 then
return "", "dir_1"
@ -403,7 +387,6 @@ function M:OnPlayerReady( ... )
if readyNum == _room.room_config.people_num then
local _cardbox = _view:GetChild("cardbox")
for i = 1, #_room.player_list do
local p = _room.player_list[i]
local zi, icon = self:GetPosString(p.seat)
_cardbox:GetChild("3d_direction" .. self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/" .. icon
@ -428,7 +411,6 @@ function M:OnPlayerReady( ... )
else
self._ctr_action.selectedIndex = 2
end
else
self._ctr_action.selectedIndex = 1
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 KiB

After

Width:  |  Height:  |  Size: 966 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 KiB

After

Width:  |  Height:  |  Size: 481 KiB