IEnumerator RandomTranslationCoroutine(int nMaxTranslation) { int n = 0; while (n++ < nMaxTranslation) { yield return(StartCoroutine(AT.TranslateCoroutine(transform, transform.position + Random.insideUnitSphere * 3, 1))); } }
public static IEnumerator MultiTranslateCoroutine(MonoBehaviour component, int nTranslation, EasingFunctionDelegate easingFunction) { for (int i = 0; i < nTranslation; i++) { yield return(component.StartCoroutine( AnimationTools.TranslateCoroutine( component, component.transform.position + Random.insideUnitSphere * 4, .5f, easingFunction ) )); } }