コード例 #1
0
 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;
 }
コード例 #2
0
        private void LightAttack2(WeaponItem weapon)
        {
            PlayerAttackAction attack = inputHandler.twoHandFlag ? weapon.TH_Light_Attack_2 : weapon.OH_Light_Attack_2;

            PerformAttack(weapon, attack);
        }
コード例 #3
0
        private void HeavyAttack1(WeaponItem weapon)
        {
            PlayerAttackAction attack = inputHandler.twoHandFlag ? weapon.TH_Heavy_Attack_1 : weapon.OH_Heavy_Attack_1;

            PerformAttack(weapon, attack);
        }