private void SetAnimSpeeds() { float attackSpeedCal = currentWeapon.GetAttackSpeed() * characterStats.GetAttackSpeed(); anim.SetFloat("AttackSpeed", attackSpeedCal); anim.SetFloat("WalkSpeed", characterStats.GetMovementSpeed()); }
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()); }
//=====Getters and Setters===== private void SetStats() { movementSpeed = characterStats.GetMovementSpeed(); jumpPower = characterStats.GetJumpPower(); }