public static void cancel(Text text = null) { if (text == null) { return; } text.text = "00"; string tag = text.GetHashCode().ToString(); CoroutineHandler.Instance().CancelCoroutine("CountDown", tag); }
public static void countDown(int seconds, Text text, OnTimeoutCallBack callback = null) { if (text == null) { CoroutineHandler.Instance().MultiDoCoroutine(run(seconds, text, callback)); } else { string tag = text.GetHashCode().ToString(); CoroutineHandler.Instance().DoCoroutine(run(seconds, text, callback), "CountDown", tag); } }
//执行音效队列 public void RunAudioList(List <string> audioNameList, bool interruptStat = false) { if (effect == null) { return; } if (interruptStat == true) {//中断原先队列 localAudioNameList = audioNameList; CoroutineHandler.Instance().DoCoroutine(RunAudioListHandle(), this.GetType().Name, "RunAudioListHandle"); } else { localAudioNameList.AddRange(audioNameList);//补充音效,不中断原来 if (audioListFinishStat == true) { CoroutineHandler.Instance().DoCoroutine(RunAudioListHandle(), this.GetType().Name, "RunAudioListHandle"); } } }