Pausing the Game

If the player needs to take a break, he can always pause the game by pressing the letter P. When the letter P is pressed, a new image will appear on the screen, informing the player that he can press the mouse button to resume the game. Add the following code in bold to create the pause code:

For q=0 To maxbull
      MoveEntity bullet(q), 0,0.8,3
      Next
;Pausing the game
If KeyDown(P_KEY) Then
      Cls
      pause=LoadImage ("pause.bmp")
      DrawImage pause,0,0
      Flip
      WaitMouse()
EndIf

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

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