From ff228d1c9534d6e66b241563fd31eb81af8a38d2 Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Tue, 08 Dec 2020 14:29:24 +0800 Subject: [PATCH] 到购买二级宝石的时间,刷新下购买按钮显示 --- 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