Destroying Gallery Items

The goal of the game is to destroy the gallery items by hitting them with the bullets that you fire from your gun. To accomplish this, we need to check to see whether a bullet has collided with a gallery item and, if so, hide the gallery item that has been hit.

For q = 0 To maxbull
      MoveEntity bullet(q), 0,0.8,3
      If CountCollisions (bullet(q))
         crash=CollisionEntity (bullet(q),1)
         HideEntity crash
      EndIf
Next

Run the program now and start firing away. You should notice that whenever a gallery item is hit, it disappears.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.237.201