Search in sources :

Example 1 with ScenarioMetaMaster

use of eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster in project Eidolons by IDemiurge.

the class UnitViewFactory method createListener.

public static ClickListener createListener(BattleFieldObject bfObj) {
    return new BattleClickListener() {

        @Override
        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
            // event.getButton() == Input.Buttons.RIGHT;
            return true;
        }

        @Override
        public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
            if (IntroTestLauncher.running) {
                ScenarioMetaMaster m = new ScenarioMetaMaster("Pride and Treachery");
                // new LinearDialogue();
                GameDialogue dialogue = null;
                dialogue = bfObj.getGame().getMetaMaster().getDialogueFactory().getDialogue("Interrogation");
                List<DialogScenario> list = SceneFactory.getScenes(dialogue);
                GuiEventManager.trigger(GuiEventType.DIALOG_SHOW, list);
            }
            if (event.getButton() == Input.Buttons.RIGHT) {
                GuiEventManager.trigger(CREATE_RADIAL_MENU, bfObj);
                event.handle();
                event.stop();
            } else {
                if (event.getButton() == Buttons.LEFT)
                    if (isAlt() || isShift() || isControl())
                        try {
                            DefaultActionHandler.leftClickUnit(isShift(), isControl(), bfObj);
                        } catch (Exception e) {
                            main.system.ExceptionMaster.printStackTrace(e);
                        }
                GuiEventManager.trigger(RADIAL_MENU_CLOSE);
            }
        }
    };
}
Also used : ScenarioMetaMaster(eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster) GameDialogue(eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue) DialogScenario(eidolons.libgdx.DialogScenario) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent) BattleClickListener(eidolons.libgdx.bf.mouse.BattleClickListener)

Example 2 with ScenarioMetaMaster

use of eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster in project Eidolons by IDemiurge.

the class Launcher method launchDC.

public static void launchDC(String partyName, boolean forceBattleInit) {
    // initSave(Launcher.getLoadPath());
    /*
         * initObjectString buffs and dynamic params non-bf objects - items,
		 */
    DC_Game game = Eidolons.game;
    try {
        initFullData();
        boolean first = false;
        if (game == null) {
            first = true;
            DC_Engine.gameInit();
        }
        DemoLauncher.main(new String[] {});
        ScreenData data = new ScreenData(ScreenType.BATTLE, "Loading...");
        GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
        Eidolons.initScenario(new ScenarioMetaMaster(ScenarioLauncher.CRAWL));
        try {
            Eidolons.mainGame.getMetaMaster().getGame().dungeonInit();
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        }
        // GdxLauncher.main(new String[]{});
        game = Simulation.getGame();
        if (game == null) {
            game = new DC_Game(false);
        }
        game.init();
        game.setSimulation(true);
        CharacterCreator.getHeroManager().prebattleCleanSave();
        game.setSimulation(false);
        game.setDebugMode(isDEBUG_MODE_DEFAULT());
        if (CharacterCreator.isArcadeMode()) {
            PartyHelper.initArcade();
        }
        PartyHelper.getParty().setGame(game);
        if (forceBattleInit || !game.isBattleInit()) {
            game.battleInit();
        }
        game.start(first);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
        game.setSimulation(true);
    }
    // setView(VIEWS.DC);
    try {
        createGame();
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
}
Also used : ScenarioMetaMaster(eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster) DC_Game(eidolons.game.core.game.DC_Game) ScreenData(eidolons.libgdx.screens.ScreenData)

Example 3 with ScenarioMetaMaster

use of eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster in project Eidolons by IDemiurge.

the class Eidolons method initDemoMeta.

public static void initDemoMeta() {
    initScenario(new ScenarioMetaMaster(ScenarioLauncher.DEFAULT));
    CharacterCreator.setGame(getGame());
    CharacterCreator.init();
}
Also used : ScenarioMetaMaster(eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster)

Example 4 with ScenarioMetaMaster

use of eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster in project Eidolons by IDemiurge.

the class MacroManager method newGame.

public static void newGame(String scenario) {
    load = false;
    metaMaster = new ScenarioMetaMaster(scenario) {

        @Override
        protected PartyManager createPartyManager() {
            return new MacroPartyManager(this);
        }
    };
    if (!CoreEngine.isMapEditor()) {
        metaMaster.init();
        if (metaMaster.getPartyManager().getParty() == null)
            return;
    }
    game = new MacroGame();
    if (!CoreEngine.isMapEditor()) {
        MacroEngine.init();
        game.start(true);
    }
    GuiEventManager.bind(MAP_READY, p -> {
        initComponents();
    });
    GuiEventManager.trigger(SCREEN_LOADED);
}
Also used : ScenarioMetaMaster(eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster) MacroPartyManager(eidolons.game.battlecraft.logic.meta.macro.MacroPartyManager) PartyManager(eidolons.game.battlecraft.logic.meta.universal.PartyManager) MacroPartyManager(eidolons.game.battlecraft.logic.meta.macro.MacroPartyManager)

Example 5 with ScenarioMetaMaster

use of eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster in project Eidolons by IDemiurge.

the class ScenarioLauncher method launch.

public static void launch(String typeName) {
    DC_Engine.jarInit();
    DemoLauncher.main(null);
    DC_Engine.mainMenuInit();
    // Eidolons.mainGame.getMetaMaster().preStart();
    master = new ScenarioMetaMaster(typeName);
    if (!Eidolons.initScenario(master)) {
        return;
    }
    ScreenData data = new ScreenData(ScreenType.BATTLE, master.getMissionName());
    // new SceneFactory("Test")
    GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
    DC_Engine.gameStartInit();
    Eidolons.mainGame.getMetaMaster().getGame().dungeonInit();
    Eidolons.mainGame.getMetaMaster().getGame().battleInit();
    Eidolons.mainGame.getMetaMaster().getGame().start(true);
// DungeonScreen.getInstance().hideLoader();
}
Also used : ScenarioMetaMaster(eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster) ScreenData(eidolons.libgdx.screens.ScreenData)

Aggregations

ScenarioMetaMaster (eidolons.game.battlecraft.logic.meta.scenario.ScenarioMetaMaster)5 ScreenData (eidolons.libgdx.screens.ScreenData)2 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)1 MacroPartyManager (eidolons.game.battlecraft.logic.meta.macro.MacroPartyManager)1 GameDialogue (eidolons.game.battlecraft.logic.meta.scenario.dialogue.GameDialogue)1 PartyManager (eidolons.game.battlecraft.logic.meta.universal.PartyManager)1 DC_Game (eidolons.game.core.game.DC_Game)1 DialogScenario (eidolons.libgdx.DialogScenario)1 BattleClickListener (eidolons.libgdx.bf.mouse.BattleClickListener)1