public void fromBytes(byte[] buf) { prop_id = BitConverter.ToUInt32(buf, 0); layer_id = BitConverter.ToUInt32(buf, 4); loc = new PacketVec2(); loc.fromBytes(buf, 8); scl = new PacketVec2(); scl.fromBytes(buf, 16); index = BitConverter.ToInt32(buf, 24); tiledeck_id = BitConverter.ToUInt32(buf, 28); grid_id = BitConverter.ToUInt32(buf, 32); debug = BitConverter.ToInt32(buf, 36); rot = BitConverter.ToSingle(buf, 40); xflip = BitConverter.ToUInt32(buf, 44); yflip = BitConverter.ToUInt32(buf, 48); color = new PacketColor(); color.fromBytes(buf, 52); }
public void fromBytes( byte[] buf ) { prop_id = BitConverter.ToUInt32(buf,0); layer_id = BitConverter.ToUInt32(buf,4); loc = new PacketVec2(); loc.fromBytes(buf,8); scl = new PacketVec2(); scl.fromBytes(buf,16); index = BitConverter.ToInt32(buf,24); tiledeck_id = BitConverter.ToUInt32(buf,28); grid_id = BitConverter.ToUInt32(buf,32); debug = BitConverter.ToInt32(buf,36); rot = BitConverter.ToSingle(buf,40); xflip = BitConverter.ToUInt32(buf,44); yflip = BitConverter.ToUInt32(buf,48); color = new PacketColor(); color.fromBytes(buf,52); }