use of eidolons.libgdx.bf.BFDataCreatedEvent in project Eidolons by IDemiurge.
the class Spawner method spawnDone.
protected void spawnDone() {
// TODO selective??
// getGame().getMetaMaster().getPartyManager().getParty().getMembers()
List<Unit> unitsList = new ArrayList<>();
unitsList.addAll(game.getUnits());
getFacingAdjuster().adjustFacing(unitsList);
final Integer cellsX = game.getDungeon().getCellsX();
final Integer cellsY = game.getDungeon().getCellsY();
GuiEventManager.trigger(SCREEN_LOADED, new BFDataCreatedEvent(cellsX, cellsY, game.getBfObjects()));
// WaitMaster.waitForInput(WAIT_OPERATIONS.DUNGEON_SCREEN_READY);
}
use of eidolons.libgdx.bf.BFDataCreatedEvent 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);
}
Aggregations