Search in sources :

Example 6 with ScreenData

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;
}
Also used : ScreenData(eidolons.libgdx.screens.ScreenData)

Example 7 with ScreenData

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);
}
Also used : ScreenData(eidolons.libgdx.screens.ScreenData)

Example 8 with ScreenData

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()));
}
Also used : ScreenData(eidolons.libgdx.screens.ScreenData)

Example 9 with ScreenData

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;
}
Also used : ScreenData(eidolons.libgdx.screens.ScreenData)

Example 10 with ScreenData

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));
}
Also used : EventCallbackParam(main.system.EventCallbackParam) ScreenData(eidolons.libgdx.screens.ScreenData)

Aggregations

ScreenData (eidolons.libgdx.screens.ScreenData)13 ScenarioMetaMaster (eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster)2 DC_Game (eidolons.game.core.game.DC_Game)2 EventCallbackParam (main.system.EventCallbackParam)2 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)1 TextButton (com.badlogic.gdx.scenes.scene2d.ui.TextButton)1 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)1 TutorialMetaMaster (eidolons.game.battlecraft.logic.meta.tutorial.TutorialMetaMaster)1 GameLauncher (eidolons.game.core.launch.GameLauncher)1 SimpleClickListener (eidolons.libgdx.gui.SimpleClickListener)1 List (java.util.List)1 Condition (main.elements.conditions.Condition)1 Conditions (main.elements.conditions.Conditions)1 Ref (main.entity.Ref)1 FileChooser (main.swing.generic.components.editors.FileChooser)1