Search in sources :

Example 1 with DC_SoundMaster

use of eidolons.system.audio.DC_SoundMaster in project Eidolons by IDemiurge.

the class DungeonScreen method afterLoad.

@Override
protected void afterLoad() {
    try {
        cam = (OrthographicCamera) viewPort.getCamera();
        controller = new DungeonInputController(cam);
        particleManager = new ParticleManager();
        soundMaster = new DC_SoundMaster(this);
        final BFDataCreatedEvent param = ((BFDataCreatedEvent) data.getParams().get());
        gridPanel = new GridPanel(param.getGridW(), param.getGridH()).init(param.getObjects());
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    gridStage.addActor(gridPanel);
    gridStage.addActor(particleManager.getEmitterMap());
    try {
        controller.setDefaultPos();
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    bindEvents();
    try {
        Unit unit = null;
        if (Eidolons.game.getMetaMaster() == null) {
            unit = Eidolons.game.getMetaMaster().getPartyManager().getParty().getLeader();
        } else
            unit = (Unit) Eidolons.game.getPlayer(true).getHeroObj();
        Vector2 unitPosition = GridMaster.getCenteredPos(unit.getCoordinates());
        cameraPan(unitPosition);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    WaitMaster.receiveInput(WAIT_OPERATIONS.DUNGEON_SCREEN_READY, true);
    WaitMaster.markAsComplete(WAIT_OPERATIONS.DUNGEON_SCREEN_READY);
}
Also used : Vector2(com.badlogic.gdx.math.Vector2) DungeonInputController(eidolons.libgdx.bf.mouse.DungeonInputController) DC_SoundMaster(eidolons.system.audio.DC_SoundMaster) GridPanel(eidolons.libgdx.bf.grid.GridPanel) BFDataCreatedEvent(eidolons.libgdx.bf.BFDataCreatedEvent) ParticleManager(eidolons.libgdx.anims.particles.ParticleManager) Unit(eidolons.entity.obj.unit.Unit)

Aggregations

Vector2 (com.badlogic.gdx.math.Vector2)1 Unit (eidolons.entity.obj.unit.Unit)1 ParticleManager (eidolons.libgdx.anims.particles.ParticleManager)1 BFDataCreatedEvent (eidolons.libgdx.bf.BFDataCreatedEvent)1 GridPanel (eidolons.libgdx.bf.grid.GridPanel)1 DungeonInputController (eidolons.libgdx.bf.mouse.DungeonInputController)1 DC_SoundMaster (eidolons.system.audio.DC_SoundMaster)1