/// <summary> ///显示时间类型进度条 /// </summary> private void StartTimeProgress(MsgShowSkillTimeProgressBar notify) { if (notify == null) { Leyoutech.Utility.DebugUtility.LogWarning("技能进度条UI", "UI 参数错误!"); return; } m_Content.gameObject.SetActive(true); m_TotalTime = notify.Duration; m_CurrentTime = 0; m_Interrupted = false; m_Coroutine = UIManager.Instance.StartCoroutine(SkillPeriodProgress()); }
/// <summary> /// 去通知UI,显示 进度条 /// </summary> /// <param name="isShow">显示/隐藏</param> /// <param name="styleIndex">样式索引</param> /// <param name="holdtime">维持时间</param> private void ToNoticeShowTimesProgressBar(bool isShow, int styleIndex = 0, float holdtime = 0) { if (isShow) { MsgShowSkillTimeProgressBar msg = new MsgShowSkillTimeProgressBar(); msg.StyleIndex = styleIndex; msg.Duration = holdtime; GameFacade.Instance.SendNotification(NotificationName.ShowSkillProgressBar, msg); } else { MsgHideSkillTimeProgressBar msg = new MsgHideSkillTimeProgressBar(); msg.StyleIndex = styleIndex; GameFacade.Instance.SendNotification(NotificationName.HidSkillProgressBar, msg); } }