public getSubTime ( int index ) : float | ||
index | int | Array index to return |
Résultat | float |
IEnumerator PlayCutsSubtitle() { mlCuts.Set(""); float currTime = 0.0f; for (int i = 0; i <= cs.getNoOfSubs(); i++) { yield return(new WaitForSeconds(cs.getSubTime(i) - currTime)); currTime = cs.getSubTime(i) + cs.getSubDuration(i); //The time the subtitle finishes at. if (i < cs.getNoOfSubs()) { //A new sub is due before this one will finish. currTime = Mathf.Min(currTime, cs.getSubTime(i + 1)); } mlCuts.Set(StringController.instance.GetString(cs.StringBlockNo, cs.getSubIndex(i))); yield return(new WaitForSeconds(cs.getSubDuration(i))); mlCuts.Set(""); //Clear the control. } }