public IEnumerator CoNormalAttack(int dmg, bool critical) { yield return(StartCoroutine(CoAnimationAttack(critical))); Prologue.PopupDmg(dmg, _target.gameObject, false, critical, ElementalType.Normal, false); _target.Animator.Hit(); }
public IEnumerator CoBlowAttack(ElementalType elementalType) { AttackEndCalled = false; yield return(StartCoroutine(CoAnimationCast(elementalType))); yield return(StartCoroutine(CoAnimationCastBlow(elementalType))); var dmgMap = new[] { 1374, 2748, 4122, 8244, 16488 }; var effect = Game.instance.Stage.SkillController.Get <SkillBlowVFX>(_target.gameObject, elementalType, SkillCategory.BlowAttack, SkillTargetType.Enemies); effect.Play(); for (var i = 0; i < 5; i++) { var sec = i == 0 ? 0 : i / 10f; Prologue.PopupDmg(dmgMap[i], _target.gameObject, false, i == 4, elementalType, false); _target.Animator.Hit(); yield return(new WaitForSeconds(sec)); } }
public IEnumerator CoFinisher(int[] damageMap, bool[] criticalMap) { AttackEndCalled = false; var position = ActionCamera.instance.Cam.ScreenToWorldPoint( new Vector2((float)Screen.width / 2, (float)Screen.height / 2)); position.z = 0f; var effect = Game.instance.Stage.objectPool.Get <FenrirSkillVFX>(position); effect.Stop(); AudioController.instance.PlaySfx(AudioController.SfxCode.FenrirGrowlSkill); yield return(new WaitForSeconds(1f)); Animator.Skill(); ActionCamera.instance.Shake(); yield return(new WaitUntil(() => AttackEndCalled)); for (var i = 0; i < 2; i++) { var first = i == 0; if (first) { effect.Play(); } else { Time.timeScale = 0.4f; } Prologue.PopupDmg(damageMap[i], _target.gameObject, false, criticalMap[i], ElementalType.Normal, false); _target.Animator.Hit(); if (first) { yield return(new WaitForSeconds(0.3f)); } else { _target.Animator.Die(); } } }
public IEnumerator CoDoubleAttack(int[] damageMap, bool[] criticalMap) { var go = _target.gameObject; var effect = Game.instance.Stage.SkillController.Get <SkillDoubleVFX>(go, ElementalType.Fire, SkillCategory.DoubleAttack, SkillTargetType.Enemy); for (var i = 0; i < 2; i++) { var first = i == 0; yield return(StartCoroutine(CoAnimationAttack(!first))); if (first) { effect.FirstStrike(); } else { effect.SecondStrike(); } Prologue.PopupDmg(damageMap[i], go, false, criticalMap[i], ElementalType.Fire, false); _target.Animator.Hit(); yield return(new WaitUntil(() => _target.Animator.IsIdle())); } }