Exemple #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));
        }
Exemple #2
0
 public override void _Ready()
 {
     _combatMenu   = GetNode <CombatMenu>("CombatMenu");
     _playerCombat = GetNode <PlayerCombat>("PlayerCombat");
     _enemyCombat  = GetNode <EnemyCombat>("EnemyCombat");
 }