示例#1
0
        public void Pack(Packer stream, object obj)
        {
            var v = (Vector2)obj;

            FloatSerializer.PackDirect(stream, v.x);
            FloatSerializer.PackDirect(stream, v.y);
        }
示例#2
0
        public object Unpack(Packer stream)
        {
            var v = new Vector2();

            v.x = FloatSerializer.UnpackDirect(stream);
            v.y = FloatSerializer.UnpackDirect(stream);

            return(v);
        }
示例#3
0
        public void Pack(Packer stream, object obj)
        {
            var v = (Quaternion)obj;

            FloatSerializer.PackDirect(stream, v.x);
            FloatSerializer.PackDirect(stream, v.y);
            FloatSerializer.PackDirect(stream, v.z);
            FloatSerializer.PackDirect(stream, v.w);
        }
示例#4
0
        public object Unpack(Packer stream)
        {
            var v = new Quaternion();

            v.x = FloatSerializer.UnpackDirect(stream);
            v.y = FloatSerializer.UnpackDirect(stream);
            v.z = FloatSerializer.UnpackDirect(stream);
            v.w = FloatSerializer.UnpackDirect(stream);

            return(v);
        }
示例#5
0
 public object Unpack(Packer packer)
 {
     return(FloatSerializer.UnpackDirect(packer));
 }
示例#6
0
 public void Pack(Packer packer, object obj)
 {
     FloatSerializer.PackDirect(packer, (float)obj);
 }