use of com.b3dgs.lionengine.game.feature.collidable.CollidableModel in project lionengine by b3dgs.
the class CollidableFramedModelTest method createFeaturable.
/**
* Create a featurable test.
*
* @param config The configuration reference.
* @param services The services reference.
* @return The featurable test.
*/
public static FeaturableModel createFeaturable(Media config, Services services) {
final Setup setup = new Setup(config);
final FeaturableModel featurable = new FeaturableModel(services, setup);
final Transformable transformable = featurable.addFeatureAndGet(new TransformableModel(services, setup));
transformable.setLocation(1.0, 2.0);
featurable.addFeature(new AnimatableModel(services, setup));
featurable.addFeatureAndGet(new CollidableModel(services, setup));
featurable.addFeature(new CollidableFramedModel(services, setup));
return featurable;
}
use of com.b3dgs.lionengine.game.feature.collidable.CollidableModel in project lionengine by b3dgs.
the class SelectorRefresherTest method prepare.
/**
* Prepare test.
*/
@BeforeEach
public void prepare() {
services.add(new ContextMock());
services.add(new Camera());
services.add(new ViewerMock());
cursor = services.create(Cursor.class);
cursor.setSync(mouse);
final Featurable featurable = new FeaturableModel(services, setup);
featurable.addFeature(new LayerableModel(services, setup));
featurable.addFeature(new TransformableModel(services, setup));
featurable.addFeature(new CollidableModel(services, setup));
refresher = new SelectorRefresher(services, model);
refresher.addListener(listener);
refresher.prepare(featurable);
}
Aggregations