public static void LoadUshort(byte[] arr, Map map, Action <IntVec3, ushort> shortWriter) { DataSerializeUtility.LoadUshort(arr, map.info.NumCells, delegate(int idx, ushort data) { shortWriter(map.cellIndices.IndexToCell(idx), data); }); }
public static ushort[] DeserializeUshort(byte[] data) { ushort[] result = new ushort[data.Length / 2]; DataSerializeUtility.LoadUshort(data, result.Length, delegate(int i, ushort dat) { result[i] = dat; }); return(result); }