Пример #1
0
        public Client(int playerId, UdpClient udpClient, PacketsReceiver packetsReceiver, PacketsSender packetsSender, PlayersManager playersManager, MetaMonoBehaviours metaMonoBehaviours)
        {
            this.playerId = playerId;

            tcpConnection = null;
            udpIpEndPoint = null;

            this.metaMonoBehaviours = metaMonoBehaviours;
            this.udpClient = udpClient;
            this.packetsReceiver = packetsReceiver;
            this.packetsSender = packetsSender;
            this.playersManager = playersManager;
        }
Пример #2
0
 public void ConnectTcp(TcpClient tcpClient)
 {
     tcpConnection = new Tcp.TcpConnection(playerId, tcpClient, packetsReceiver, packetsSender, playersManager, metaMonoBehaviours);
     tcpConnection.InitializeCommunication();
 }