Search in sources :

Example 1 with SelectorRefresher

use of com.b3dgs.lionengine.game.feature.collidable.selector.SelectorRefresher 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);
}
Also used : CollidableModel(com.b3dgs.lionengine.game.feature.collidable.CollidableModel) ViewerMock(com.b3dgs.lionengine.ViewerMock) TransformableModel(com.b3dgs.lionengine.game.feature.TransformableModel) FeaturableModel(com.b3dgs.lionengine.game.feature.FeaturableModel) Camera(com.b3dgs.lionengine.game.feature.Camera) ContextMock(com.b3dgs.lionengine.ContextMock) Cursor(com.b3dgs.lionengine.game.Cursor) Featurable(com.b3dgs.lionengine.game.feature.Featurable) SelectorRefresher(com.b3dgs.lionengine.game.feature.collidable.selector.SelectorRefresher) LayerableModel(com.b3dgs.lionengine.game.feature.LayerableModel) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ContextMock (com.b3dgs.lionengine.ContextMock)1 ViewerMock (com.b3dgs.lionengine.ViewerMock)1 Cursor (com.b3dgs.lionengine.game.Cursor)1 Camera (com.b3dgs.lionengine.game.feature.Camera)1 Featurable (com.b3dgs.lionengine.game.feature.Featurable)1 FeaturableModel (com.b3dgs.lionengine.game.feature.FeaturableModel)1 LayerableModel (com.b3dgs.lionengine.game.feature.LayerableModel)1 TransformableModel (com.b3dgs.lionengine.game.feature.TransformableModel)1 CollidableModel (com.b3dgs.lionengine.game.feature.collidable.CollidableModel)1 SelectorRefresher (com.b3dgs.lionengine.game.feature.collidable.selector.SelectorRefresher)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1