private ComponentLibrary componentLibrary;
private PojoPrefabManager prefabManager;
@Before
public void setup() throws Exception {
ModuleManager moduleManager = ModuleManagerFactory.create();
ReflectFactory reflectFactory = new ReflectionReflectFactory();
CopyStrategyLibrary copyStrategyLibrary = new CopyStrategyLibrary(reflectFactory);
TypeSerializationLibrary lib = new TypeSerializationLibrary(reflectFactory, copyStrategyLibrary);
lib.add(Vector3f.class, new Vector3fTypeHandler());
lib.add(Quat4f.class, new Quat4fTypeHandler());
entitySystemLibrary = new EntitySystemLibrary(reflectFactory, copyStrategyLibrary, lib);
componentLibrary = entitySystemLibrary.getComponentLibrary();
prefabManager = new PojoPrefabManager();
AssetManager assetManager = new AssetManager(moduleManager.getEnvironment());
assetManager.setAssetFactory(AssetType.PREFAB, new AssetFactory<PrefabData, Prefab>() {
@Override
public Prefab buildAsset(AssetUri uri, PrefabData data) {
return new PojoPrefab(uri, data);
}