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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user