同步四人

master
罗家炜 2025-04-22 11:22:03 +08:00
parent 9e2a2ea614
commit fb1a70d4af
2 changed files with 3 additions and 3 deletions

View File

@ -204,8 +204,8 @@ function M:InitPlayerInfoView()
local _player_info = self._player_info
for i = 1, self._room.room_config.people_num do
print("================================InitPlayerInfoView",
string.format("player_info%d_%d", i, self._state.selectedIndex + 1))
local tem = self._view:GetChild(string.format("player_info%d_%d", i, self._state.selectedIndex + 1))
string.format("player_info%d_%d", i, (self._state.selectedIndex + 1) % 2))
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex + 1) % 2))
_player_info[i] = PlayerInfoView.new(tem, self)
tem.visible = false
end
@ -906,7 +906,7 @@ function M:UpdatePlayerInfoView()
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 + 1))
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex + 1) % 2))
_player_info[i] = PlayerInfoView.new(tem, self)
_player_info[i]:FillData(list[i])
end