use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class Crawler method main.
public static void main(String[] args) {
FAST_DC.FAST_MODE = false;
ExplorationMaster.setTestMode(true);
DC_Engine.jarInit();
FontMaster.init();
GuiManager.init();
int index = DialogMaster.optionChoice(launch_options, "Choose the type of Eidolons game you want to launch...");
List<String> parts = null;
if (index == 0) {
String data = FileManager.readFile(launchDataPath);
parts = StringMaster.openContainer(data);
index = 1;
}
if (index == 2) {
// random = true;
// parts = Collections.nCopies(2, "");
} else if (index == 3) {
FAST_DC.main(new String[] { "" + (Arrays.asList(PresetLauncher.LAUNCH_OPTIONS)).indexOf(StringMaster.getWellFormattedString(LAUNCH.EXPLORATION.toString())) });
return;
} else if (index == 4) {
FAST_DC.main(new String[] { "" + (Arrays.asList(PresetLauncher.LAUNCH_OPTIONS)).indexOf(StringMaster.getWellFormattedString(LAUNCH.EXPLORATION_TEST.toString())) });
return;
}
DemoLauncher.main(null);
DC_Engine.mainMenuInit();
String dungeon = parts == null ? "crawl" + new FileChooser(PathFinder.getDungeonLevelFolder() + "crawl").launch("", "") : parts.get(0);
launchData += dungeon;
dungeon = StringMaster.removePreviousPathSegments(dungeon, PathFinder.getDungeonLevelFolder());
ScreenData data = new ScreenData(ScreenType.BATTLE, dungeon);
GameLauncher launcher = new GameLauncher(GAME_SUBCLASS.TEST);
Ref ref = new Ref();
Condition conditions = new Conditions();
launcher.PLAYER_PARTY = parts == null ? ListChooser.chooseType(DC_TYPE.CHARS, ref, conditions) : parts.get(1);
launchData += StringMaster.SEPARATOR + launcher.PLAYER_PARTY;
launcher.setDungeon(dungeon);
launcher.PARTY_CODE = CODE.PRESET;
launcher.ENEMY_CODE = CODE.NONE;
GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
DC_Engine.gameStartInit();
DC_Game game = launcher.initDC_Game();
game.start(true);
if (!StringMaster.isEmpty(launchData)) {
FileManager.write(launchData, launchDataPath);
}
}
use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class TutorialLauncher method main.
public static void main(String[] args) {
DemoLauncher.main(null);
DC_Engine.mainMenuInit();
TutorialMetaMaster master = new TutorialMetaMaster("");
master.init();
ScreenData data = new ScreenData(ScreenType.BATTLE, "name");
GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN, data);
DC_Engine.gameStartInit();
master.preStart();
// master.getGame().init( );
master.getGame().dungeonInit();
master.getGame().battleInit();
master.getGame().start(true);
// DungeonScreen.getInstance().hideLoader();
}
use of eidolons.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class NewGamePanel method updateAct.
@Override
public void updateAct(float delta) {
final List<ScreenData> dataList = (List<ScreenData>) getUserObject();
dataList.forEach(data -> {
TextButton button = getMainMenuButton(data.getName());
button.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
if (choiceCallback != null) {
choiceCallback.accept(data);
}
}
});
add(button);
row();
});
addEmptyRow(0, 30);
back = getMainMenuButton("back");
if (backListener != null) {
back.addListener(backListener);
}
add(back);
}
use of eidolons.libgdx.screens.ScreenData 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.libgdx.screens.ScreenData in project Eidolons by IDemiurge.
the class MacroGameLoop method startBattle.
private void startBattle(Place entered) {
// stop all the map related stuff
/*
we need
1) dungeon level
2) party data
3)
*/
// TODO blackout
String name = ScenarioGenerator.generateScenarioType(entered).getName();
// GuiEventManager.trigger(GuiEventType.SWITCH_SCREEN,
// new ScreenData(ScreenType.PRE_BATTLE, "Wait..."));
// Eidolons.initScenario(new ScenarioMetaMaster(name));
ScreenData data = new ScreenData(ScreenType.BATTLE, // entered.getName()
name);
// 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);
}
Aggregations