use of eidolons.game.battlecraft.logic.meta.scenario.dialogue.speech.Speech in project Eidolons by IDemiurge.
the class DialogueFactory method createDialogue.
public LinearDialogue createDialogue(String name, String idSequence) {
Speech parent = null;
Speech root = null;
for (String ID : StringMaster.open(idSequence)) {
Speech speech = getSpeech(StringMaster.getInteger(ID));
String pathRoot = getFileRootPath();
// PathFinder.getScenariosPath() +p +StringMaster.getPathSeparator()+
// TextMaster.getLocale();
String path = PathFinder.getEnginePath() + DialogueLineFormatter.getLinesFilePath(pathRoot);
speech.getSpeechBuilder(path).buildSpeech(speech);
if (root == null)
root = speech;
if (parent != null) {
parent.addChild(speech);
speech.init(master, parent);
}
parent = speech;
}
return new LinearDialogue(root, name);
}
use of eidolons.game.battlecraft.logic.meta.scenario.dialogue.speech.Speech in project Eidolons by IDemiurge.
the class SceneFactory method getScenes.
// TODO Speech?
public static List<DialogScenario> getScenes(GameDialogue dialogue) {
Speech speech = dialogue.getRoot();
List<SpeechData> fullData = new ArrayList<>();
while (true) {
fullData.add(speech.getData());
if (speech.getChildren().isEmpty())
break;
speech = speech.getChildren().get(0);
}
return getScenes(fullData);
}
use of eidolons.game.battlecraft.logic.meta.scenario.dialogue.speech.Speech in project Eidolons by IDemiurge.
the class SceneFactory method getScenes.
public static List<DialogScenario> getScenes(List<SpeechData> fullData) {
Speech speech;
// speech.getFormattedText()
List<DialogScenario> list = new ArrayList<>();
// for (String substring : StringMaster.open(data)) {
TextureRegion backTexture = null;
for (SpeechData data : fullData) {
TextureRegion portraitTexture = null;
String message = null;
boolean skippable = true;
Integer time = -1;
message = data.getValue(SPEECH_VALUE.MESSAGE);
if (!StringMaster.isEmpty(data.getValue(SPEECH_VALUE.ACTOR)))
portraitTexture = TextureCache.getOrCreateR(DialogueActorMaster.getActor(data.getValue(SPEECH_VALUE.ACTOR)).getImagePath());
if (!StringMaster.isEmpty(data.getValue(SPEECH_VALUE.BACKGROUND)))
backTexture = TextureCache.getOrCreateR(data.getValue(SPEECH_VALUE.BACKGROUND));
list.add(new DialogScenario(time, skippable, backTexture, message, portraitTexture));
}
return list;
}
Aggregations