四人同步
parent
ccf13a0e8b
commit
1f3b1e2ebb
|
|
@ -1,11 +1,14 @@
|
|||
local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView_jiangxi")
|
||||
local MJPlayerCardInfoView = import(".MJPlayerCardInfoView_jiangxi")
|
||||
-- local MJPlayerCardInfoView = import(".MJPlayerCardInfoView_jiangxi")
|
||||
-- local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView")
|
||||
local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView")
|
||||
local MJMainView = require("main.majiang.MJMainView")
|
||||
local EXClearingView = import(".EXClearingView")
|
||||
local TX_GameEvent = import(".GameEvent")
|
||||
local HuTipView = import("main.majiang.HuTipView")
|
||||
local SettingView = import(".EXSettingView")
|
||||
local PlayerInfoView = import(".EXPlayerInfoView_jiangxi")
|
||||
-- local PlayerInfoView = import(".EXPlayerInfoView")
|
||||
local M = {}
|
||||
|
||||
--- Create a new ZZ_MainView
|
||||
|
|
@ -25,7 +28,9 @@ function M:InitView(url)
|
|||
self._gps_style = 1
|
||||
self._full = true
|
||||
UIPackage.AddPackage("extend/majiang/lichuan/ui/Extend_MJ_LiChuan")
|
||||
-- MJMainView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d", room.room_config.people_num))
|
||||
MJMainView.InitView(self, string.format("ui://Main_Majiang/Main_new_%d_jiangxi", room.room_config.people_num))
|
||||
|
||||
self._hu_tip = HuTipView.new(self)
|
||||
|
||||
self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人黎川麻将 ' .. room.score_times .. '倍'
|
||||
|
|
@ -204,6 +209,8 @@ function M:InitPlayerInfoView()
|
|||
local _player_info = self._player_info
|
||||
for i = 1, self._room.room_config.people_num do
|
||||
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
|
||||
-- local tem = self._view:GetChild(string.format("player_info%d", i))
|
||||
|
||||
_player_info[i] = PlayerInfoView.new(tem, self)
|
||||
tem.visible = false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
local EXTEND_MODEL_NAME = ...
|
||||
|
||||
local EXGameInfo = import(".EXGameInfo")
|
||||
-- local EXMainView = import(".EXMainView_jaingxi")
|
||||
local EXMainView = import(".EXMainView")
|
||||
local EXMainView = import(".EXMainView_jaingxi")
|
||||
-- local EXMainView = import(".EXMainView")
|
||||
local EXGameController = import(".EXGameController")
|
||||
local EXRoomConfig = import(".EXRoomConfig")
|
||||
local EXPlayBackView = import(".EXPlayBackView")
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ function M:ShowHuTip(card_list)
|
|||
end
|
||||
|
||||
function M:UpdateHandCard(getcard, mp)
|
||||
-- MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp)
|
||||
MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp)
|
||||
local _carViewList = self._carViewList
|
||||
local card_list = DataManager.CurrenRoom.self_player.card_list
|
||||
--[[
|
||||
|
|
@ -148,7 +148,6 @@ function M:UpdateHandCard(getcard, mp)
|
|||
|
||||
|
||||
-----------------------lingmeng---------------------------
|
||||
print("lingmenghand", getcard)
|
||||
getcard = getcard or false
|
||||
mp = mp or false
|
||||
|
||||
|
|
@ -158,48 +157,31 @@ function M:UpdateHandCard(getcard, mp)
|
|||
self._view_getCard:RemoveChildren()
|
||||
-- end
|
||||
|
||||
print("lingmenghand1", #card_list)
|
||||
pt(card_list)
|
||||
|
||||
for i = 0, (#card_list) - 1 do
|
||||
local tem_card = card_list[i + 1]
|
||||
local btn_card
|
||||
print("lingmenghand2", i)
|
||||
if getcard and i == (#card_list) - 1 then
|
||||
btn_card = self._view_getCard:AddItemFromPool()
|
||||
print("lingmenghand2-1-1")
|
||||
-- btn_card = self._view:GetChild('Btn_HandCard')
|
||||
btn_card.onClick:Add(function(context)
|
||||
self:__OnClickGetCard(context)
|
||||
end)
|
||||
print("lingmenghand2-1-2")
|
||||
print("===================lingmengcuowulail==============")
|
||||
else
|
||||
print("lingmenghand2-2-1")
|
||||
|
||||
-- if i >= self._view_handCardList.numItems then
|
||||
btn_card = self._view_handCardList:AddItemFromPool()
|
||||
-- else
|
||||
-- btn_card = self._view_handCardList:GetChildAt(i)
|
||||
-- end
|
||||
print("lingmenghand2-2-2")
|
||||
end
|
||||
print("lingmenghandbuchong", btn_card, handCardName, tem_card)
|
||||
print("lingmenghandbuchong2", btn_card:GetChild("icon"), btn_card:GetChild("icon").url)
|
||||
btn_card.icon = 'ui://Main_Majiang/' .. handCardName .. tem_card
|
||||
-- self:fillCard2(btn_card, handCardName, tem_card)
|
||||
print("lingmenghand2-3")
|
||||
self:fillCard2(btn_card, handCardName, tem_card)
|
||||
local c_v = NewCardView(btn_card, tem_card)
|
||||
c_v.index = i
|
||||
c_v.old_postion = btn_card.xy
|
||||
_carViewList[#_carViewList + 1] = c_v
|
||||
btn_card.data = c_v
|
||||
print("lingmenghand2-4")
|
||||
btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin))
|
||||
btn_card.onTouchMove:Set(handler(self, self.onTouchMove))
|
||||
btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd))
|
||||
-- btn_card.onClick:Set(handler(self, self.__OnClickHandCard))
|
||||
print("lingmenghand2-5")
|
||||
end
|
||||
print("lingmenghand3", getcard, self._ctr_getCard)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue