Search in sources :

Example 1 with PrefMapFill

use of com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapFill in project lionengine by b3dgs.

the class Scene method load.

@Override
public void load() {
    map.create(Medias.create("forest.png"));
    mapViewer.prepare(map);
    final Media media = Medias.create("transitions.xml");
    TransitionsConfig.exports(media, Arrays.asList(Medias.create("forest.png")), Medias.create("sheets.xml"), Medias.create("groups.xml"));
    map.addFeatureAndGet(new MapTileGroupModel()).loadGroups(Medias.create("groups.xml"));
    map.addFeatureAndGet(new MapTileTransitionModel()).loadTransitions(Medias.create("transitions.xml"));
    map.addFeatureAndGet(new MapTileCircuitModel()).loadCircuits(Medias.create("circuits.xml"));
    UtilFile.deleteFile(media.getFile());
    camera.setView(0, 0, 1024, 768, getHeight());
    camera.setLimits(map);
    parameters.add(new PrefMapSize(16, 16, 64, 48)).add(new PrefMapFill(0)).add(new PrefMapRegion(12, new TileArea(0, 0, 8, 48), 4, 60)).add(new PrefMapRegion(12, new TileArea(56, 0, 64, 48), 4, 60)).add(new PrefMapRegion(12, new TileArea(0, 0, 64, 8), 4, 60)).add(new PrefMapRegion(12, new TileArea(0, 40, 64, 48), 4, 60)).add(new PrefMapRegion(29, new TileArea(12, 12, 56, 42), 2, 250)).add(new PrefMapRegion(12, new TileArea(24, 24, 40, 40), 2, 80)).add(new PrefMapRegion(0, new TileArea(4, 4, 60, 40), 1, 100));
    tickGen.start();
    tick.start();
}
Also used : PrefMapSize(com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapSize) TileArea(com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.TileArea) PrefMapRegion(com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapRegion) Media(com.b3dgs.lionengine.Media) PrefMapFill(com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapFill) MapTileGroupModel(com.b3dgs.lionengine.game.feature.tile.map.MapTileGroupModel) MapTileTransitionModel(com.b3dgs.lionengine.game.feature.tile.map.transition.MapTileTransitionModel) MapTileCircuitModel(com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.MapTileCircuitModel)

Aggregations

Media (com.b3dgs.lionengine.Media)1 MapTileGroupModel (com.b3dgs.lionengine.game.feature.tile.map.MapTileGroupModel)1 MapTileTransitionModel (com.b3dgs.lionengine.game.feature.tile.map.transition.MapTileTransitionModel)1 MapTileCircuitModel (com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.MapTileCircuitModel)1 PrefMapFill (com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapFill)1 PrefMapRegion (com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapRegion)1 PrefMapSize (com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.PrefMapSize)1 TileArea (com.b3dgs.lionengine.game.feature.tile.map.transition.circuit.generator.TileArea)1