Exemplo n.º 1
0
 public UM_RTM_Room(GK_RTM_Match match)
 {
     foreach (GK_Player player in match.Players)
     {
         UM_RTM_Participant participant = new UM_RTM_Participant(player);
         _Participants.Add(participant);
     }
 }
Exemplo n.º 2
0
 public UM_RTM_Room(GP_RTM_Room room)
 {
     foreach (GP_Participant p in room.participants)
     {
         UM_RTM_Participant participant = new UM_RTM_Participant(p);
         _Participants.Add(participant);
     }
 }
Exemplo n.º 3
0
    public void SetParticipant(UM_RTM_Participant participant)
    {
        id.text         = "ID: " + participant.Id;
        status.text     = participant.Status.ToString();
        playerId.text   = "Player Id: " + participant.Id;
        playerName.text = "Name: " + participant.Name;

        if (participant.SmallIcon != null)
        {
            avatar.GetComponent <Renderer>().material.mainTexture = participant.SmallIcon;
        }
        else
        {
            avatar.GetComponent <Renderer>().material.mainTexture = defaulttexture;
        }
    }
    void HandleMatchDataReceived(string senderId, byte[] data)
    {
        string str = string.Empty;

#if !UNITY_WP8 && !UNITY_WSA
        System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
        str = enc.GetString(data);
#endif
        string name = senderId;

        UM_RTM_Participant p = RTM.Matchmaker.CurrentRoom.GetParticipantById(senderId);
        if (p != null)
        {
            name = p.Name;
        }

        AndroidMessage.Create("Data Eeceived", "player " + name + " \n " + "data: " + str);
    }