예제 #1
0
 public void SyncTeamInfo(Google.Protobuf.Collections.RepeatedField <GameProto.TeamRoleData> oInfo)
 {
     if (oInfo == null)
     {
         return;
     }
     for (int i = 0; i < m_arrRedPlayers.Length; ++i)
     {
         m_arrRedPlayers[i].Init();
     }
     for (int i = 0; i < m_arrBluePlayers.Length; ++i)
     {
         m_arrBluePlayers[i].Init();
     }
     for (int i = 0; i < oInfo.Count; i++)
     {
         LobbyTeamPlayer pPlayer = Instance().GetPlayerBySlot(oInfo[i].DwSlotId);
         pPlayer.Init(oInfo[i].RoleData);
     }
 }
예제 #2
0
 public static void SyncTeamInfo(GameProto.LoginNotifyPlayerTeamInfo oInfo)
 {
     if (Instance() == null)
     {
         return;
     }
     for (int i = 0; i < Instance().m_arrRedPlayers.Length; ++i)
     {
         Instance().m_arrRedPlayers[i].Init();
     }
     for (int i = 0; i < Instance().m_arrBluePlayers.Length; ++i)
     {
         Instance().m_arrBluePlayers[i].Init();
     }
     for (int i = 0; i < oInfo.TeamRoleData.Count; i++)
     {
         LobbyTeamPlayer pPlayer = Instance().GetPlayerBySlot(oInfo.TeamRoleData[i].DwSlotId);
         pPlayer.Init(oInfo.TeamRoleData[i].RoleData);
     }
 }