补充新界面人物头像信息随游戏状态改变
parent
b6670a1db7
commit
c713edf178
|
|
@ -25,11 +25,12 @@ function M:InitView(url)
|
|||
self._gps_style = 1
|
||||
self._full = true
|
||||
UIPackage.AddPackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng")
|
||||
if self._room.room_config.people_num == 2 then
|
||||
MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
|
||||
else
|
||||
MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2")
|
||||
end
|
||||
-- if self._room.room_config.people_num == 2 then
|
||||
-- MJMainView.InitView(self, "ui://Main_Majiang/Main_new_" .. room.room_config.people_num)
|
||||
-- else
|
||||
-- MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2")
|
||||
-- end
|
||||
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 .. '倍'
|
||||
|
|
@ -49,6 +50,11 @@ function M:InitView(url)
|
|||
|
||||
self.jing = self._view:GetChild('jing')
|
||||
|
||||
self._state.onChanged:Add(function()
|
||||
print("==============================UpdatePlayerInfoView1")
|
||||
self:UpdatePlayerInfoView()
|
||||
end)
|
||||
|
||||
local showNextCtr = self._view:GetController('showNext')
|
||||
local ShowNextConfrimCtr = self._view:GetController('showNextConfrim')
|
||||
local showNextList = self._view:GetChild('list_showNext')
|
||||
|
|
@ -212,12 +218,24 @@ function M:InitPlayerInfoView()
|
|||
self._player_info = {}
|
||||
local _player_info = self._player_info
|
||||
for i = 1, self._room.room_config.people_num do
|
||||
local tem = self._view:GetChild("player_info" .. i)
|
||||
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
|
||||
_player_info[i] = PlayerInfoView.new(tem, self)
|
||||
tem.visible = false
|
||||
end
|
||||
end
|
||||
|
||||
function M:UpdatePlayerInfoView()
|
||||
self._player_info = {}
|
||||
local _player_info = self._player_info
|
||||
local list = self._room.player_list
|
||||
|
||||
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))
|
||||
_player_info[i] = PlayerInfoView.new(tem, self)
|
||||
_player_info[i]:FillData(list[i])
|
||||
end
|
||||
end
|
||||
|
||||
function M:NewMJPlayerCardInfoView(view, index)
|
||||
if index == 1 then
|
||||
return MJPlayerSelfCardInfoView.new(view, self)
|
||||
|
|
|
|||
Loading…
Reference in New Issue