public void Accept <TUpdate, TSnapshot>(uint componentId, Dynamic.VTable <TUpdate, TSnapshot> vtable) where TUpdate : struct, ISpatialComponentUpdate where TSnapshot : struct, ISpatialComponentSnapshot { var maybeSnapshot = template.GetComponent <TSnapshot>(); if (!maybeSnapshot.HasValue) { return; } var snapshot = maybeSnapshot.Value; viewDiff.AddComponent(vtable.ConvertSnapshotToUpdate(snapshot), entityId, componentId); }
public void Accept <TSnapshot, TUpdate>(uint componentId, DynamicConverter.SnapshotToUpdate <TSnapshot, TUpdate> snapshotToUpdate) where TSnapshot : struct, ISpatialComponentSnapshot where TUpdate : struct, ISpatialComponentUpdate { var maybeSnapshot = template.GetComponent <TSnapshot>(); if (!maybeSnapshot.HasValue) { return; } var snapshot = maybeSnapshot.Value; viewDiff.AddComponent(snapshotToUpdate(snapshot), entityId, componentId); }