use of net.engio.mbassy.bus.error.IPublicationErrorHandler in project Entitas-Java by Rubentxu.
the class MatchOne method create.
@Override
public void create() {
AssetManager assetsManager = new AssetManager(new TestFileHandleResolver());
BasePreferencesManager preferencesManager = new BasePreferencesManager();
MatchOneEngine engine = new MatchOneEngine();
engine.addManager(new BaseAssetsManager(assetsManager, preferencesManager));
// new Collections(new CollectionsFactory() {
// @Override
// public <T> List<T> createList(Class<T> clazz) {
// if (clazz.equals(Integer.class))
// return (List<T>) new IntArrayList();
// else
// return new ObjectArrayList();
// }
//
// @Override
// public <T> Set createSet(Class<T> clazz) {
// if (clazz.equals(Integer.class))
// return new IntArraySet();
// else
// return new ObjectOpenHashSet();
// }
//
// @Override
// public <K, V> Map createMap(Class<K> keyClazz, Class<V> valueClazz) {
// return new Object2ObjectArrayMap();
// }
//
//
// });
new EntitasCollections(new CollectionsFactories() {
});
MBassador bus = new MBassador(new IPublicationErrorHandler() {
@Override
public void handleError(PublicationError error) {
Gdx.app.error("EBUS ERROR: ", error.toString());
}
});
game = new MatchOneGame(engine, new EGEventBus(bus));
game.init();
game.pushState(new MatchOneState(engine));
}
Aggregations