public void addString(LineAndSpeaker s) { hasEnded = false; DataHolder.allowInteractions = false; lines.Add(s); if (index >= lines.Count) { mTimeElapsed = 0; } ProcessNew(); }
public void AddQueuers(DialogForks d, int randomNum) { if (d.playInOrder) { playInOrder = true; } d.hasParent = true; d.takeAction(); foreach (TheseDialogQueuers t in d.dialogQueuers) { // Add lines of this dialogQueuer with index of randomNum to a temp array of LineAndSpeaker LineAndSpeaker[] temp1 = dialogQueuers[randomNum].lines; // Add lines of t.dialogQueuer to a second temp array of LineAndSpeaker LineAndSpeaker[] temp2 = t.lines; // create new array of LineAndSpeaker with size of temp1 + temp2 LineAndSpeaker[] both = new LineAndSpeaker[temp1.Length + temp2.Length]; // Populate array with lineAndSpeakers from temp1 and temp2 for (int i = 0; i < temp1.Length; i++) { both[i] = temp1[i]; } for (int i = 0; i < temp2.Length; i++) { both[i + temp1.Length] = temp2[i]; } // Set lines of this dialogQueuer to the last array t.getThisDialogQueuer().lines = both; dialogQueuers.Add(t); } }