public IEnumerator MonsterSkillShow(List <DamageResult> damageResults) { ClearDamageShow(); foreach (var damageResult in damageResults) { var monInfo = _MonsterShowDict[damageResult._TargetMotion]; float animTime = monInfo._MonsterModel.PlayAttack(); yield return(new WaitForSeconds(0.2f)); if (damageResult._UseSkill is SkillDamage) { PlayerUISound(_ElimitAttackSound, 1); } else if (damageResult._UseSkill != null) { PlayerUISound(_ElimitSkillSound, 1); } yield return(new WaitForSeconds(animTime - 0.2f)); _DmgTextNormal.transform.position = _HPBar.transform.position; _DmgTextNormal.transform.localPosition += new Vector3(0, 10, 0); _DmgTextNormal.gameObject.SetActive(true); _DmgTextNormal.text = "-" + damageResult.DamageValue; UpdateSelfHPBar(damageResult._AfterHP); if (damageResult._SkillBallsResult != null) { UIFightBox.ShowMonsterBalls(damageResult._SkillBallsResult); } yield return(new WaitForSeconds(0.3f)); ClearDamageShow(); if (damageResult._AfterHP <= 0 && BattleField.Instance._RoleMotion.IsDied) { UIStageFail.ShowAsyn(); } yield return(new WaitForSeconds(0.2f)); } RefreshMonsterCD(); GameCore.Instance.EventController.PushEvent(EVENT_TYPE.EVENT_LOGIC_MONSTER_SKILL_FINISH, this, null); UIFightBox.HideOptMask(); RefreshOptRound(); }
public void StartShowMonsterSkill(List <DamageResult> damageResult) { if (UIFightBox.IsTestMode()) { if (BattleField.Instance._RoleMotion._HP <= 0 && BattleField.Instance._RoleMotion.IsDied) { UIStageFail.ShowAsyn(); } UpdateSelfHPBar(BattleField.Instance._RoleMotion._HP); GameCore.Instance.EventController.PushEvent(EVENT_TYPE.EVENT_LOGIC_MONSTER_SKILL_FINISH, this, null); return; } StartCoroutine(MonsterSkillShow(damageResult)); }
private void BattleFail() { UIStageFail.ShowAsyn(); Debug.Log("BattleFail"); }