Ejemplo n.º 1
0
        public static void DebugPackets()
        {
            MeshPacket p = new MeshPacket();

            p.SetSourceObjectId(5);
            p.SetTargetObjectId(10);
            p.SetSourcePlayerId(1234);
            p.SetTargetPlayerId(4321);
            p.SetSubcomponentID(2);
            p.SetPacketType(PacketType.DatabaseUpdate);
            p.SetContents(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 });
            byte[]     buffer    = p.GetSerializedBytes();
            MeshPacket newPacket = new MeshPacket(buffer);

            Debug.Log(newPacket.GetTargetObjectId());
            Debug.Log(newPacket.GetPacketType());
        }