예제 #1
0
    private void Response(int error, List <byte[]> btData)
    {
        var response   = LoginResponse.ParseFrom(btData[0]);
        var playerInfo = response.PlayerInfo;
        var userName   = playerInfo.UserName;
        var userId     = playerInfo.UserId;
        var rank       = playerInfo.Rank;
        var winning    = playerInfo.Winning;
        var losing     = playerInfo.Losing;
        var winCount   = playerInfo.WinCount;
        var loseCount  = playerInfo.LoseCount;
        var draw       = playerInfo.Draw;
        var index      = playerInfo.UserRank;

        m_userProxy.SetPlayerInfo(userName, userId, rank, winning, losing, winCount, loseCount, draw, index);
        App.NetworkManager.UserId = userId;
        Debug.Log("Login Success ! UserName: "******" UserId: " + userId);

        SendNotification(NotificationConstant.LoginResponse);
    }