Example #1
0
        protected override void ShowCutscene()
        {
            if (Costumes.Exists(x => x.ItemSubType == ItemSubType.FullCostume))
            {
                return;
            }

            AreaAttackCutscene.Show(GetAmorId());
        }
Example #2
0
        private IEnumerator PlayerFinisher()
        {
            _player.Ready();
            var sfxCode = AudioController.GetElementalCastingSFX(ElementalType.Fire);

            AudioController.instance.PlaySfx(sfxCode);
            _player.Animator.Cast();
            var pos           = _player.transform.position;
            var castingEffect = Game.instance.Stage.SkillController.Get(pos, ElementalType.Fire);

            castingEffect.Play();
            AreaAttackCutscene.Show(_player.GetAmorId());
            yield return(new WaitForSeconds(0.6f));

            var effect = Game.instance.Stage.SkillController.Get <SkillAreaVFX>(_knight.gameObject, ElementalType.Fire, SkillCategory.AreaAttack, SkillTargetType.Enemies);

            effect.Play();
            yield return(new WaitForSeconds(0.5f));

            var dmgMap = new[] { 1617, 4851, 8085, 12936, 38808 };

            for (var i = 0; i < 5; i++)
            {
                yield return(new WaitForSeconds(0.14f));

                if (i == 4)
                {
                    effect.StopLoop();
                    yield return(new WaitForSeconds(0.1f));

                    _player.Animator.CriticalAttack();
                    effect.Finisher();
                    yield return(new WaitUntil(() => effect.last.isStopped));

                    yield return(new WaitForSeconds(0.2f));
                }
                _battle.ShowComboText(true);
                PopupDmg(dmgMap[i], _pig.gameObject, true, i == 4, ElementalType.Fire, false);
                PopupDmg(dmgMap[i], _knight.gameObject, true, i == 4, ElementalType.Fire, false);
                StartCoroutine(_pig.CoHit());
                StartCoroutine(_knight.CoHit());
            }
            _pig.Animator.Die();
            _knight.Animator.Die();
            yield return(new WaitUntil(() => _player.AttackEnd));

            yield return(new WaitForSeconds(1f));
        }