/// <summary> /// 跑进度条动画 /// </summary> /// <returns></returns> IEnumerator GridProgress() { List <UIGrowUpFightPowerGrid> gridList = m_GrowUpFightPowerGridCreator.GetGrids <UIGrowUpFightPowerGrid>(true); float gridTime = 0.5f;//每个grid要跑的时间 for (int i = 0; i < gridList.Count; i++) { for (float time = 0; time <= gridTime; time += Time.deltaTime) { gridList[i].SetAnalysisProgress(gridTime > 0 ? time / gridTime : 0); yield return(0); } gridList[i].SetAnalysisProgress(1); m_GrowUpFightPowerGridCreator.FocusGrid(i, false); gridList = m_GrowUpFightPowerGridCreator.GetGrids <UIGrowUpFightPowerGrid>(true); } ShowGoUpWidget(); yield return(0); }