Beispiel #1
0
        public static PacketOutStream response_float(float[] arrs)
        {
            PacketOutStream packet = new PacketOutStream();

            packet.writeShort((short)PacketOpcode.SERVER.RESPONSE_FLOAT);
            packet.writeInt(arrs.Length);
            foreach (float s in arrs)
            {
                packet.writeFloat(s);
            }
            return(packet);
        }
Beispiel #2
0
        public static PacketOutStream response_cube(Transform arrs)
        {
            PacketOutStream packet = new PacketOutStream();

            packet.writeShort((short)PacketOpcode.SERVER.RESPONSE_CUBE);

            packet.writeFloat(arrs.localPosition.x);
            packet.writeFloat(arrs.localPosition.y);
            packet.writeFloat(arrs.localPosition.z);

            packet.writeFloat(arrs.localEulerAngles.x);
            packet.writeFloat(arrs.localEulerAngles.y);
            packet.writeFloat(arrs.localEulerAngles.z);

            packet.writeFloat(arrs.localScale.x);
            packet.writeFloat(arrs.localScale.y);
            packet.writeFloat(arrs.localScale.z);

            return(packet);
        }