void Awake() { Instance = this; //Go into file, and check for all defined values try { PARSER.Define_Expressions(); PARSER.Define_Poses(); PARSER.Define_Characters(); } catch { } }
public static void Run(int _nodeValue = -1) { //Check if we are not passed a index value if (InBounds((int)LineIndex, Dialogue) && IS_TYPE_IN() == false) { Dialogue[(int)LineIndex] = Dialogue[(int)LineIndex].Replace("@ ", "").Replace("<< ", ""); RunningDialogue = true; CurrentNode = _nodeValue; //We'll parse the very first dialogue that is ready to be displayed Dialogue[(int)LineIndex] = PARSER.PARSER_LINE(Dialogue[(int)LineIndex]); Instance.StartCoroutine(PrintCycle()); } }
public static void Progress() { if (LineIndex < Dialogue.Count - 1 && IS_TYPE_IN() == true) { LineIndex += 1; GET_TMPGUI().text = STRINGNULL; SET_TYPE_IN_VALUE(false); CursorPosition = reset; //We'll parse the next dialogue that is ready to be displayed Dialogue[(int)LineIndex] = PARSER.PARSER_LINE(Dialogue[(int)LineIndex]); } else { End(); } }
static void ExcludeAllFunctionTags(string _text) { PARSER.PARSER_LINE(Dialogue[(int)LineIndex]); //Action tag! ExecuteActionFunctionTag(ACTION, ref _text); //Insert tag! ExecuteInsertFunctionTag(INSERT, ref _text); //Speed Command Tag: It will consider all of the possible values. ExecuteSpeedFunctionTag(SPEED, ref _text); //Expression tag! ExecuteExpressionFunctionTag(EXPRESSION, ref _text); //Pose tag! ExecutePoseFunctionTag(POSE, ref _text); //Halt tage ExecuteWaitFunctionTag(HALT, ref _text); }
private static void CollectDialogue(int _dialogueSet, string dsPath, out string line, ref int position, ref bool foundDialogueSet) { using (StreamReader fileReader = new StreamReader(dsPath)) { while (true) { line = fileReader.ReadLine(); if (line == null) { if (foundDialogueSet) { return; } else { Debug.Log("Dialogue Set " + _dialogueSet.ToString("D3", CultureInfo.InvariantCulture) + " does not exist. Try adding it to the .dsf referenced."); return; } } line.Split(PARSER.Delimiters); if (line.Contains("<DIALOGUE_SET_" + _dialogueSet.ToString("D3", CultureInfo.InvariantCulture) + ">")) { foundDialogueSet = true; DialogueSet = _dialogueSet; PARSER.GetDialogue(position); } position++; } } }