//Updatefunction void Update() { //if the internal routine is null if (internalRoutine == null) { //if given routine doesn't continue if (!routine.MoveNext()) { Stop(); } //get type of routine if (routine.Current != null) { Type currentType = routine.Current.GetType(); //Check if WWW or internal WaitForSeconds if (currentType == typeof(WWW)) { WWWWrapper internalWww = new WWWWrapper(routine.Current as WWW); internalRoutine = isTrue(internalWww); } else if (currentType == typeof(WaitForSeconds)) { internalRoutine = isTrue(routine.Current as WaitForSeconds); } } } if (internalRoutine != null) { if (!internalRoutine.MoveNext()) { internalRoutine = null; } if (internalRoutine.Current != null && (bool)internalRoutine.Current) { internalRoutine = null; } } }
//Updatefunction void Update() { //if the internal routine is null if (internalRoutine == null) { //if given routine doesn't continue if (!routine.MoveNext()) { Stop(); } //get type of routine if (routine.Current != null) { Type currentType = routine.Current.GetType(); //Check if WWW or internal WaitForSeconds if (currentType == typeof(WWW)) { WWWWrapper internalWww = new WWWWrapper(routine.Current as WWW); internalRoutine = isTrue(internalWww); } else if (currentType == typeof (WaitForSeconds)) { internalRoutine = isTrue(routine.Current as WaitForSeconds); } } } if (internalRoutine != null) { if (!internalRoutine.MoveNext()) { internalRoutine = null; } if (internalRoutine.Current != null && (bool)internalRoutine.Current) { internalRoutine = null; } } }