/// <summary> Constructor. </summary> /// <param name="model"> The ui component associated with the item. </param> /// <param name="stats"> The damage stats for the item. </param> /// <param name="resource"> The ui resource associated with the item. </param> public FireableWeaponItem(IFireableWeaponModel model, FireableWeaponStats stats, IUiResource resource) { Model = model; Stats = stats; Resource = resource; }
public void No_damage_at_end() { var stats = new FireableWeaponStats() { DamagePerShot = 10, MaxDistance = 100, FalloffDistance = 50 }; Assert.Equal(0, stats.CalculateDamage(100), 3); }
public void Damage_at_full() { var stats = new FireableWeaponStats() { DamagePerShot = 10, MaxDistance = 100, FalloffDistance = 50 }; Assert.Equal(10f, stats.CalculateDamage(50), 3); }
public void DamageAtHalf() { var stats = new FireableWeaponStats() { DamagePerShot = 10, MaxDistance = 100, FalloffDistance = 50 }; Assert.Equal(5.0f, stats.CalculateDamage(75), 3); }