Time for action — modifying the gameClasses file

To modify the gameClasses file, we will follow the ensuing steps:

  1. Open the gameClasses.monkey file.
  2. Add an Import statement for the bombClass.monkey file.
    Import explosionClass
    Import bombClass
    
  3. Save the file and close it.

What just happened?

You have added importing of the bombClass.monkey file so it can be used now.

Updating bombs

Just like rockets, bombs will move down the screen, and so need to be updated each frame. For this, we need to call the function UpdateBombs within the UpdateGame method.

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

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