document alt handling
This commit is contained in:
@@ -167,14 +167,17 @@
|
|||||||
null))
|
null))
|
||||||
((objectWith trackKey start end alts)
|
((objectWith trackKey start end alts)
|
||||||
(case (dictGet altIdx "$actorName $text")
|
(case (dictGet altIdx "$actorName $text")
|
||||||
|
// First time playing, use first alt:
|
||||||
(null
|
(null
|
||||||
(dictSet altIdx "$actorName $text" 0)
|
(dictSet altIdx "$actorName $text" 0)
|
||||||
(set customCC ->:Void {})
|
(set customCC ->:Void {})
|
||||||
(director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc))
|
(director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc))
|
||||||
|
// All alts played, loop back to first alt:
|
||||||
((when (>= idx alts.length) idx)
|
((when (>= idx alts.length) idx)
|
||||||
(dictSet altIdx "$actorName $text" 0)
|
(dictSet altIdx "$actorName $text" 0)
|
||||||
(set customCC ->:Void {})
|
(set customCC ->:Void {})
|
||||||
(director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc))
|
(director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc))
|
||||||
|
// Play next alt
|
||||||
(idx
|
(idx
|
||||||
(let [alt (nth alts idx)
|
(let [alt (nth alts idx)
|
||||||
start alt.start
|
start alt.start
|
||||||
|
Reference in New Issue
Block a user