use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class Eidolons method toMainMenu.
private static void toMainMenu() {
GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, new ScreenData(ScreenType.MAIN_MENU, "Back to the Void..."));
ScenarioLauncher.missionIndex = 0;
}
use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class ScenarioMetaMaster method next.
@Override
public void next(Boolean outcome) {
boolean restart = false;
if (outcome == null) {
restart = true;
}
super.next(outcome);
if (outcome != null)
if (outcome) {
if (getMetaGame().isFinalLevel()) {
getBattleMaster().getOutcomeManager().victory();
return;
}
ScenarioLauncher.missionIndex++;
}
// if (ScenarioLauncher.missionIndex >= 6) {
// ScreenData data = new ScreenData(ScreenType.BATTLE, getMissionName(),
// new SceneFactory("Test"));
// GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
// return;
// }
// TODO getDialogueManager().getDialogueForMission(getMissionName());
getMetaDataManager().setMissionName(null);
getMetaDataManager().initMissionName();
ScreenData data = new ScreenData(ScreenType.BATTLE, getMissionName());
GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
if (restart) {
Eidolons.mainGame.getMetaMaster().getMetaGame().setRestarted(true);
Eidolons.setParty(null);
} else {
Eidolons.setParty(getPartyManager().getParty());
}
if (!Eidolons.initScenario(new ScenarioMetaMaster(getData()))) {
return;
}
// if (restart){
// Eidolons.mainGame.getMetaMaster().getMetaGame().setRestarted(true);
// Eidolons.mainGame.getMetaMaster(). init();
// }
Eidolons.mainGame.getMetaMaster().getGame().dungeonInit();
Eidolons.mainGame.getMetaMaster().getGame().battleInit();
Eidolons.mainGame.getMetaMaster().getGame().start(true);
}
use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class ScenarioSelectionPanel method closed.
@Override
public void closed(Object selection) {
setVisible(false);
if (selection == null) {
return;
}
// new Thread(new Runnable() {
// public void run() {
// Eidolons.initScenario(new ScenarioMetaMaster(selection.toString()));
// }
// }, " thread").start();
GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, new ScreenData(ScreenType.BATTLE, selection.toString()));
}
use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class GameMenuHandler method clicked.
public Boolean clicked(GAME_MENU_ITEM sub) {
switch(sub) {
case QUICK_HELP:
GuiEventManager.trigger(GuiEventType.SHOW_TEXT_CENTERED, HelpMaster.getHelpText());
break;
case MANUAL:
GuiEventManager.trigger(GuiEventType.SHOW_MANUAL_PANEL, HelpMaster.getHelpText());
break;
case HERO_INFO:
GuiEventManager.trigger(GuiEventType.SHOW_TEXT_CENTERED, HelpMaster.getWelcomeText());
break;
case EXIT:
// DC_Game.game.exit(true);
try {
DC_Game.game.getMetaMaster().gameExited();
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
// Gdx.input.setInputProcessor(new InputAdapter());
GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, new ScreenData(ScreenType.MAIN_MENU, "Loading..."));
Eidolons.gameExited();
GameMenu.menuOpen = false;
return false;
case RESTART:
Eidolons.getGame().getMetaMaster().getBattleMaster().getOutcomeManager().restart();
break;
case PASS_TIME:
Eidolons.getGame().getDungeonMaster().getExplorationMaster().getTimeMaster().playerWaits();
break;
case RUN:
GameMenu.menuOpen = false;
GuiEventManager.trigger(GuiEventType.BATTLE_FINISHED);
// Eidolons.gameExited();
break;
case RESUME:
break;
case OPTIONS:
// OptionsMaster.openMenu();
menu.openOptionsMenu();
// GuiEventManager.trigger(GuiEventType.OPEN_OPTIONS, MainMenuStage.class);
return null;
case INFO:
break;
case WEBSITE:
break;
case ABOUT:
break;
case LAUNCH_GAME:
break;
}
return null;
}
use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class DemoLauncher method screenInit.
@Override
protected void screenInit() {
ScreenData data = new ScreenData(ScreenType.BATTLE, "Loading...");
screenSwitcher(new EventCallbackParam(data));
}
Aggregations