private void PerformAttack(WeaponItem weapon, PlayerAttackAction attack) { if (playerStats.currentStamina <= 0) { return; } if (attack.actionAnimation == string.Empty) { throw new Exception("Attack with missing animation called: " + attack); } weaponSlotManager.attackingWeapon = weapon; animatorHandler.PlayTargetAnimation(attack.actionAnimation, true, true); lastAttack = attack; }
private void LightAttack2(WeaponItem weapon) { PlayerAttackAction attack = inputHandler.twoHandFlag ? weapon.TH_Light_Attack_2 : weapon.OH_Light_Attack_2; PerformAttack(weapon, attack); }
private void HeavyAttack1(WeaponItem weapon) { PlayerAttackAction attack = inputHandler.twoHandFlag ? weapon.TH_Heavy_Attack_1 : weapon.OH_Heavy_Attack_1; PerformAttack(weapon, attack); }