/// <summary> /// 检查引导状态 /// </summary> IEnumerator CheckGuideState() { Log.Write(GetType() + "/CheckGuideState"); yield return(new WaitForSeconds(0.2f)); while (true) { yield return(new WaitForSeconds(0.5f)); for (int i = 0; i < _LiGuideTrigger.Count; i++) { IGuideTrigger iTrigger = _LiGuideTrigger[i]; //检查每个业务脚本是否可以运行 if (iTrigger.CheckCondition()) { //每个业务脚本,执行业务逻辑 if (iTrigger.RunOperation()) { Log.Write(GetType() + "/CheckGuideState()/编号为:" + i + "业务逻辑执行完毕,即将在集合中移除"); _LiGuideTrigger.Remove(iTrigger); } } } } }
/// <summary> /// Check boot status /// </summary> /// <returns></returns> IEnumerator CheckGuidState() { Log.Write(GetType() + "/CheckGuidState"); yield return(new WaitForSeconds(GlobalParameter.INTERVAL_TIME_0DOT2)); while (true) { yield return(new WaitForSeconds(GlobalParameter.INTERVAL_TIME_0DOT5)); for (int i = 0; i < _LiGuideTrigger.Count; i++) { IGuideTrigger iTrigger = _LiGuideTrigger[i]; //check every trigger is able to run if (iTrigger.CheckCondition()) { //Each trigger script, carried out trigger logic if (iTrigger.RunOperation()) { Log.Write(GetType() + "/CheckGuidState()/Number of trigger" + i + "logic run complete"); _LiGuideTrigger.Remove(iTrigger); } } //if_end } //for_end } //while_end } //CheckGuidState_End