use of com.b3dgs.lionengine.game.feature.TransformableModel in project lionengine by b3dgs.
the class UtilProducible method createProducible.
/**
* Create producible.
*
* @param services The services.
* @return The producible.
*/
public static Featurable createProducible(Services services) {
final Media media = createProducibleMedia();
final Setup setup = new Setup(media);
final Featurable featurable = new FeaturableModel(services, setup);
featurable.addFeature(new TransformableModel(services, setup));
featurable.addFeature(new ProducibleModel(services, setup));
return featurable;
}
use of com.b3dgs.lionengine.game.feature.TransformableModel 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