public static NetworkResponse Parse(MemoryStream dataStream)
    {
        ResponseTopList response = new ResponseTopList();
        response.name1 = DataReader.ReadString(dataStream);
        response.score1 = DataReader.ReadInt(dataStream);
        response.name2 = DataReader.ReadString(dataStream);
        response.score2 = DataReader.ReadInt(dataStream);
        response.name3 = DataReader.ReadString(dataStream);
        response.score3 = DataReader.ReadInt(dataStream);

        return response;
    }
Exemple #2
0
    public static NetworkResponse Parse(MemoryStream dataStream)
    {
        ResponseTopList response = new ResponseTopList();

        response.name1  = DataReader.ReadString(dataStream);
        response.score1 = DataReader.ReadInt(dataStream);
        response.name2  = DataReader.ReadString(dataStream);
        response.score2 = DataReader.ReadInt(dataStream);
        response.name3  = DataReader.ReadString(dataStream);
        response.score3 = DataReader.ReadInt(dataStream);

        return(response);
    }
Exemple #3
0
    public void ProcessTopList(NetworkResponse response)
    {
        ResponseTopList args = response as ResponseTopList;

        //client team -- use this data for the toplist functionality
        topPlayers     = new string[3];
        topPlayers [0] = args.name1;
        topPlayers [1] = args.name2;
        topPlayers [2] = args.name3;
        Debug.Log("rank 1 player: " + args.name1 + " with " + args.score1 + " points.");
        Debug.Log("rank 2 player: " + args.name2 + " with " + args.score2 + " points.");
        Debug.Log("rank 3 player: " + args.name3 + " with " + args.score3 + " points.");
    }
Exemple #4
0
    private void ProcessTopList(NetworkResponse response)
    {
        ResponseTopList args = response as ResponseTopList;

        topPlayerNames [0]  = args.name1;
        topPlayerNames [1]  = args.name2;
        topPlayerNames [2]  = args.name3;
        topPlayerScores [0] = args.score1;
        topPlayerScores [1] = args.score2;
        topPlayerScores [2] = args.score3;
        //Debug.Log ("rank 1 player: " + args.name1 + " with " + args.score1 + " points.");
        //Debug.Log ("rank 2 player: " + args.name2 + " with " + args.score2 + " points.");
        //Debug.Log ("rank 3 player: " + args.name3 + " with " + args.score3 + " points.");
    }