public void Pack(Packer stream, object obj) { var v = (Vector2)obj; FloatSerializer.PackDirect(stream, v.x); FloatSerializer.PackDirect(stream, v.y); }
public object Unpack(Packer stream) { var v = new Vector2(); v.x = FloatSerializer.UnpackDirect(stream); v.y = FloatSerializer.UnpackDirect(stream); return(v); }
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); }
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); }
public object Unpack(Packer packer) { return(FloatSerializer.UnpackDirect(packer)); }
public void Pack(Packer packer, object obj) { FloatSerializer.PackDirect(packer, (float)obj); }