Creates an explosion when hitting something. The explosion deals damage to ANY tank it hits, including the tank that fired the bullet.
Create explosion on hit
Scale explosion size with tank stats.
Projectiles collision
Projectiles now collide with the edge of the terrain and with the obstacles.
The TankStats has already defined a projectile damage value. This value is used by the ProjectileController as a base damage value. ProjectileController adds a DamageMultiplier value, which is used in combination with the base damage to compute the actual damage
base damage * damage multiplier = actual damage
With the image above in mind, an example; a tank with base damage of 10 and explosive ammo, will hit the enemy for 10 * 0.75 = 7.5 damage.
Fixes #31
Changes
Normal ammo
Regular bullets, nothing fancy
Armor piercing ammo
Similar to normal ammo, but bypasses armor
Explosive ammo
Creates an explosion when hitting something. The explosion deals damage to ANY tank it hits, including the tank that fired the bullet. Create explosion on hit Scale explosion size with tank stats.
Projectiles collision
Projectiles now collide with the edge of the terrain and with the obstacles.
Damage system
The
TankStats
has already defined a projectile damage value. This value is used by theProjectileController
as a base damage value.ProjectileController
adds aDamageMultiplier
value, which is used in combination with the base damage to compute the actual damageWith the image above in mind, an example; a tank with base damage of
10
and explosive ammo, will hit the enemy for10 * 0.75 = 7.5
damage.