Esempio n. 1
0
    public void SitToTable(int seat, MultiplayerGamersCommunicator multiplayerGamersCommunicator)
    {
        int playersSeat = GetPlayersSeat();

        if (LobbyPlayerStats.RoomData.getRoomOwner() == PlayerName)
        {
            //  INFORM OTHERS
            Dictionary <string, object> tableProperties = new Dictionary <string, object>();
            tableProperties.Add("SEAT" + seat.ToString(), PlayerName);
            List <string> removeProperties = null;
            if (playersSeat != -1)
            {
                gameTable.LeaveTable(playersSeat);
                removeProperties = new List <string>();
                removeProperties.Add("SEAT" + playersSeat.ToString());
            }
            WarpClient.GetInstance().UpdateRoomProperties(LobbyPlayerStats.RoomData.getId(), tableProperties, removeProperties);
        }
        else
        {
            string peerSitUpdate = "SIT-" + seat.ToString() + "-" + PlayerName;
            if (playersSeat != -1)
            {
                gameTable.LeaveTable(playersSeat);
            }
            MultiplayerManager.SendBytes(ByteHelper.GetBytes(peerSitUpdate));
        }
    }
Esempio n. 2
0
 //Mono Behaviour
 void Start()
 {
     m_apppwarp        = transform.GetComponent <MultiplayerManager>();
     multiplayerGamers = transform.parent.FindChild("MultiplayerGamers").GetComponent <MultiplayerGamersCommunicator>();
 }