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);
}
}
};
}
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);
}
}
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();
}
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);
}
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();
}
Aggregations