Ejemplo n.º 1
0
        public async Task AnimatePlayerAttack(PlayerCombat playerCombat,
                                              CombatUtil.CombatAction action)
        {
            if (action == CombatUtil.CombatAction.Counter)
            {
                await _attackEffect.Play(_effectAnimations.GetAnimation("counter"),
                                         CombatUtil.GetActionColor(CombatUtil.CombatAction.Heavy));
            }

            var damageType = playerCombat.GetDamageType(action);

            if (damageType == "none")
            {
                return;
            }
            var effectAnimation = _effectAnimations.GetAnimation(damageType);
            await _attackEffect.Play(effectAnimation,
                                     CombatUtil.GetActionColor(action));
        }