/// <summary> /// Updates the current fill amount on all MPBars to show MP being added or lost /// </summary> /// <param name="isLoss"> Flag for if damaged animation should play </param> /// <param name="isFocusAnim"> Flag for if there is a focus animation that needs to be yielded to </param> /// <returns> IEnumerator for animations </returns> public IEnumerator DisplayMPChange(bool isLoss, bool isFocusAnim) { if (statusPanelMPBar != null) { statusPanelMPBar.SetCurrent(pm.CMP); } if (statsPanelMPBar != null) { statsPanelMPBar.SetCurrentDisplayCurrentOverMax(pm.CMP); } if (EventManager.instance.partyPanel.isOpen == true) { partyPanelMPBar.SetCurrent(pm.CMP); } if (isFocusAnim == true) { if (isCrit == true) { eventDescription.SetPMFocusCritText(pm, attackAmount); isCrit = false; } else { eventDescription.SetPMFocusText(pm, attackAmount); } yield return(new WaitForSeconds(1f / GameManager.instance.gsDataCurrent.animationSpeed)); } yield break; }