Example #1
0
    public void OnLoginNotifyPlayerTeamInfo(byte[] pBuf)
    {
        GameProto.LoginNotifyPlayerTeamInfo oRet = GameProto.LoginNotifyPlayerTeamInfo.Parser.ParseFrom(pBuf);
        if (oRet == null)
        {
            SampleDebuger.Log("OnLoginNotifyPlayerTeamInfo error parse");
            return;
        }
        string szContent = "OnLoginNotifyPlayerTeamInfo team id : " + oRet.QwTeamId.ToString() + "\n";

        for (int i = 0; i < oRet.TeamRoleData.Count; ++i)
        {
            szContent += "playerid : " + oRet.TeamRoleData[i].RoleData.QwPlayerId.ToString()
                         + ", slot id : " + oRet.TeamRoleData[i].DwSlotId.ToString()
                         + ", serverid : " + oRet.TeamRoleData[i].DwServerId.ToString() + "\n";
        }

        SampleDebuger.Log(szContent);
        TeamData.Instance().SetTeamRoleData(oRet.TeamRoleData);

        if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != GameConstant.g_szLobbyTeamScene)
        {
            AssetBundleLoader.Instance().LoadLevelAsset(GameConstant.g_szLobbyTeamScene, delegate()
            {
            }
                                                        );
        }
        else
        {
            TeamPlayerManager.SyncTeamInfo(oRet);
        }
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     TeamPlayerManager.Instance().SyncTeamInfo(TeamData.Instance().proTeamRoleData);
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     TeamPlayerManager.Instance().PrepareSyncTeamInfo(TeamData.Instance().proTeamRoleData);
     TeamData.Instance().Reset();
 }