四人同步

master
罗家炜 2025-04-22 11:29:01 +08:00
parent fb1a70d4af
commit b76c8a1fa2
2 changed files with 5 additions and 4 deletions

View File

@ -203,9 +203,9 @@ function M:InitPlayerInfoView()
self._player_info = {}
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) % 2))
local tem = self._view:GetChild(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 % 2) + 1))
print("lingmengplay", string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
_player_info[i] = PlayerInfoView.new(tem, self)
tem.visible = false
end
@ -906,7 +906,8 @@ 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) % 2))
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
print("lingmengplay", 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