Refactor WeaponStats and related classes to include attack speed, range, and damage type; update damage calculations for melee and ranged attacks

This commit is contained in:
2025-07-11 22:09:15 +02:00
parent 9261b9f00f
commit 57896441ab
6 changed files with 31 additions and 18 deletions

View File

@@ -17,17 +17,9 @@ namespace Weapons
public GameObject Owner { get; private set; }
public DamageType Type => DamageType.Ranged;
public void Setup(Character attacker, WeaponStats weaponStats = null)
public void Setup(Character attacker, float damage, WeaponStats weaponStats = null)
{
if (weaponStats != null)
{
Damage = weaponStats.Damage + attacker.attributes.Damage * attacker.attributes.RangedDamage;
}
else
{
Damage = attacker.attributes.Damage * attacker.attributes.RangedDamage;
}
Damage = damage;
Owner = attacker.gameObject;
}