public static void InitializeDeviceBase <T>(this IMyObjectBuilder_GunObject <T> gunObjectBuilder, MyObjectBuilder_DeviceBase newBuilder) where T : MyObjectBuilder_DeviceBase { Debug.Assert(newBuilder.TypeId == typeof(T)); if (newBuilder.TypeId != typeof(T)) { return; } gunObjectBuilder.DeviceBase = newBuilder; }
public void Init(MyObjectBuilder_DeviceBase objectBuilder) { InventoryItemId = objectBuilder.InventoryItemId; }