use of com.b3dgs.lionengine.game.feature.Setup in project lionengine by b3dgs.
the class StateConfigTest method testExportsImports.
/**
* Test exports imports.
*/
@Test
void testExportsImports() {
final Xml root = new Xml("test");
root.add(StateConfig.exports(Class.class));
final Media media = Medias.create("state.xml");
root.save(media);
assertEquals(Class.class.getName(), StateConfig.imports(new Setup(media)).get());
assertTrue(media.getFile().delete());
}
use of com.b3dgs.lionengine.game.feature.Setup in project lionengine by b3dgs.
the class MapTileCollisionModelTest method createObject.
/**
* Create object test.
*
* @return The object test.
*/
private Transformable createObject() {
final Setup setup = new Setup(config);
CollisionCategoryConfig.exports(setup.getRoot(), categoryY);
CollisionCategoryConfig.exports(setup.getRoot(), categoryX);
final FeaturableModel object = new FeaturableModel(services, setup);
final Transformable transformable = object.addFeatureAndGet(new TransformableModel(services, setup));
transformable.setSize(1, 1);
final TileCollidable collidable = object.addFeatureAndGet(new TileCollidableModel(services, setup));
collidable.setEnabled(true);
return transformable;
}
Aggregations