public IEnumerator ExecuteLogic_Coroutine(ITextWrapperComponent pText, string strText) { if (bUseRealTime) { yield return(new WaitForSecondsRealtime(fDelaySecond)); } else { yield return(new WaitForSeconds(fDelaySecond)); } pText.strText = ""; float fProgress_0_1 = 0f; while (fProgress_0_1 < 1f) { int iTextLength = (int)(strText.Length * fProgress_0_1); pText.strText = strText.Substring(0, iTextLength); if (bUseRealTime) { fProgress_0_1 += Time.unscaledDeltaTime / fDurationSecond; } else { fProgress_0_1 += Time.deltaTime / fDurationSecond; } yield return(null); } pText.strText = strText; yield break; }
// ========================================================================== // /* protected - [Override & Unity API] */ protected override void OnAwake() { base.OnAwake(); if (pTextWrapper == null) { pTextWrapper = GetComponentInChildren <ITextWrapperComponent>(); } for (int i = 0; i < listLogic_Insert_OnAwake.Count; i++) { DoAddLogic(listLogic_Insert_OnAwake[i].eEventWhen, listLogic_Insert_OnAwake[i].pPopupTextLogic); } }