Time for action – destroying enemies
Add
checkShotEnemyImpacts()
andcheckRocketSplashDamage()
to the Collision Detection region of theWeaponManager
module:Private Sub checkShotEnemyImpacts(shot As Sprite) If shot.Expired Then Return End If For Each enemyTank As Enemy in EnemyManager.Enemies If Not enemyTank.Destroyed Then If (shot.IsCircleColliding( enemyTank.EnemyBase.WorldCenter, enemyTank.EnemyBase.CollisionRadius)) Then shot.Expired = True enemyTank.Destroyed = True If shot.Frame = 0 Then EffectsManager.AddExplosion( enemyTank.EnemyBase.WorldCenter, enemyTank.EnemyBase.Velocity / 30) Else If shot.Frame = 1 createLargeExplosion(shot.WorldCenter) checkRocketSplashDamage(shot.WorldCenter) End If...