示例#1
0
        private void SetAnimSpeeds()
        {
            float attackSpeedCal = currentWeapon.GetAttackSpeed() * characterStats.GetAttackSpeed();

            anim.SetFloat("AttackSpeed", attackSpeedCal);
            anim.SetFloat("WalkSpeed", characterStats.GetMovementSpeed());
        }
示例#2
0
 private void EquipWeaponForAnim(Weapons newWeapon)
 {
     currentWeapon = newWeapon;
     if (newWeapon.GetAttackType() == AttackType.Sword) // TODO NEEDS ATACHING ANIMATIONS TO WEAPONS
     {
         OverrideAttackAnimation(twoHandedSwordAttack);
         OverrideIdleAnimation(twoHandedSwordIdle);
         OverrideWalkAnimation(twoHandedSwordWalk);
     }
     else if (newWeapon.GetAttackType() == AttackType.Axe)
     {
         OverrideAttackAnimation(twoHandedAxeAttack);
         OverrideIdleAnimation(twoHandedAxeIdle);
         OverrideWalkAnimation(twoHandedAxeWalk);
     }
     else if (newWeapon.GetAttackType() == AttackType.Punch)
     {
         OverrideAttackAnimation(baseAttackingClip);
         OverrideIdleAnimation(baseIdleClip);
         OverrideWalkAnimation(baseWalkingClip);
     }
     SetAnimationSpeed(charStats.GetMovementSpeed(), charStats.GetAttackSpeed());
 }