use of com.b3dgs.lionengine.game.Cursor in project lionengine by b3dgs.
the class HudTest method before.
/**
* Prepare test.
*/
@BeforeEach
public void before() {
services.add(new ContextMock());
services.add(new Handler(services));
services.add(new Factory(services));
services.add(new ViewerMock());
services.add(new Cursor(services));
services.add(new ComponentCollision());
}
use of com.b3dgs.lionengine.game.Cursor in project lionengine by b3dgs.
the class UtilActionnable method createServices.
/**
* Create the services.
*
* @param clicked The click flag.
* @param clickNumber The click number recorded.
* @return The services.
*/
public static Services createServices(AtomicBoolean clicked, AtomicReference<Integer> clickNumber) {
final Services services = new Services();
services.add(new ContextMock());
final Cursor cursor = new Cursor(services) {
@Override
public boolean isPushedOnce(Integer click) {
clickNumber.set(click);
return clicked.get();
}
};
cursor.setArea(0, 0, 32, 32);
cursor.setLocation(0, 1);
services.add(cursor);
return services;
}
Aggregations