Exemple #1
0
 // Some initialization stuff after stanzas have been added. Sets the timestamps for this
 // sentence, and lets each stanza know what index it is in the sentence.
 public void SetupAfterAddingStanzas(int indexInSentences)
 {
     if (this.stanzas.Count > 0)
     {
         this.earliestTimestamp             = this.stanzas[0].GetComponent <Stanza>().GetStartTimestamp();
         this.latestAudioPlayTimestamp      = this.stanzas[this.stanzas.Count - 1].GetComponent <Stanza>().GetEndTimestamp();
         this.latestTimestampNoModification = this.stanzas[this.stanzas.Count - 1].GetComponent <Stanza>().GetEndTimestampNoModification();
     }
     // Swiping on any stanza in the sentence will play that sentence starting from
     // the swiped stanza.
     for (int i = 0; i < this.stanzas.Count; i++)
     {
         Stanza stanza = this.stanzas[i].GetComponent <Stanza>();
         stanza.SetIndexInSentence(i);
         stanza.SetSentenceIndex(indexInSentences);
         stanza.SetSentenceTimestamps(this.stanzas[i].GetComponent <Stanza>().GetStartTimestamp(),
                                      this.latestAudioPlayTimestamp);
     }
 }