Time for action – shots colliding with tiles
Add the
checkShotWallImpacts()
method to theWeaponManager
module:#Region "Collision Detection" Private Sub checkShotWallImpacts(shot As Sprite) If shot.Expired Then Return End If If TileMap.IsWallTile( TileMap.GetSquareAtPixel(shot.WorldCenter)) Then shot.Expired = True If shot.Frame = 0 Then EffectsManager.AddSparksEffect( shot.WorldCenter, shot.Velocity) Else createLargeExplosion(shot.WorldCenter) End If End If End Sub #End Region
Add the
createLargeExplosion()
method to the Shot Management Methods region of theWeaponManager
module:Private Sub createLargeExplosion(location As Vector2) EffectsManager.AddLargeExplosion( location + New Vector2(-10, -10)) EffectsManager.AddLargeExplosion( location + New Vector2(-10, 10)) EffectsManager.AddLargeExplosion( location + New Vector2...