public static void read(this Dictionary <Vector2, TactileLibrary.Data_Unit> dictionary, BinaryReader reader) { dictionary.Clear(); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { //int id = reader.ReadInt32(); Vector2 key = Vector2.Zero; key = key.read(reader); TactileLibrary.Data_Unit value = TactileLibrary.Data_Unit.read(reader); dictionary.Add(key, value); } }
public void reset(Data_Unit unit) { type = unit.type; identifier = unit.identifier; data = unit.data; }