From df178fec76b6f6fed0326ff9f07bef2206dd75f9 Mon Sep 17 00:00:00 2001 From: liuzhiwei <liuzhiwei@qq.com> Date: Fri, 04 Dec 2020 18:11:17 +0800 Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master --- Assets/Scripts/Guide/CharForeach.cs | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/Assets/Scripts/Guide/CharForeach.cs b/Assets/Scripts/Guide/CharForeach.cs index 26738dc..0974cc9 100644 --- a/Assets/Scripts/Guide/CharForeach.cs +++ b/Assets/Scripts/Guide/CharForeach.cs @@ -12,6 +12,7 @@ private Text text; public delegate void CallBack(); private Action callBack; + private Action callBackFinal = null; void Awake() { @@ -39,6 +40,20 @@ word = wordArray[arrayIndex]; text.text = ""; callBack = cb; + StartCoroutine("TypeText"); + } + } + + public void StartFinalShowWord(string[] str, Action cb, Action cb2) + { + if (!isStarting) + { + wordArray = str; + arrayIndex = 0; + word = wordArray[arrayIndex]; + text.text = ""; + callBack = cb; + callBackFinal = cb2; StartCoroutine("TypeText"); } } @@ -80,6 +95,8 @@ { SetText(charArray[i]); } + callBackFinal?.Invoke(); + } } @@ -95,6 +112,7 @@ } isStarting = false; + callBackFinal?.Invoke(); yield break; } -- Gitblit v1.9.1