public void Accept <T>(uint componentId, DynamicSnapshot.SnapshotDeserializer <T> deserializeSnapshot, DynamicSnapshot.SnapshotSerializer <T> serializeSnapshot) where T : struct, ISpatialComponentSnapshot { var schemaObject = EntitySnapshot.Get(componentId).Value; Components.Add(componentId, deserializeSnapshot(schemaObject)); }
public void Accept <T>(uint componentId, DynamicSnapshot.SnapshotDeserializer <T> deserializeSnapshot, DynamicSnapshot.SnapshotSerializer <T> serializeSnapshot) where T : struct, ISpatialComponentSnapshot { if (!data.ContainsKey(componentId)) { return; } var componentData = new ComponentData(new SchemaComponentData(componentId)); serializeSnapshot((T)data[componentId], componentData); Entity.Add(componentData); }