Exemple #1
0
    public void Send_Center(Vector3 input)
    {
        NetDataWriter writer = new NetDataWriter();

        writer.Put("Center");
        Debug.Log("----------------------Sending the center coordinates-----------------------");
        Vector3Packet.Serialize(writer, input);
        foreach (var item in _ourPeer)
        {
            item.Send(writer, DeliveryMethod.ReliableOrdered);
        }
    }
    public void SendPoint(List <Vector3> marker, NetPeer peer)
    {
        NetDataWriter writer = new NetDataWriter();

        writer.Put("PathIncomig");
        writer.Put(marker.Count);
        for (int i = 0; i < marker.Count; i++)
        {
            Vector3Packet.Serialize(writer, marker[i]);
        }
        peer.Send(writer, DeliveryMethod.ReliableOrdered);
    }
Exemple #3
0
    public void SendPoint(Vector3[] marker)
    {
        NetDataWriter writer = new NetDataWriter();

        writer.Put("PathIncomig");
        writer.Put(marker.Length);
        for (int i = 0; i < marker.Length - 1; i++)
        {
            Vector3Packet.Serialize(writer, marker[i]);
        }
        foreach (var item in _ourPeer)
        {
            item.Send(writer, DeliveryMethod.ReliableOrdered);
        }
    }