Time for action — modifying the gameClasses file
To modify the gameClasses
file, follow the ensuing steps:
- Open the
gameClasses.monkey
file. - Add an
Import
statement for the rocketClass.monkey
file. - Save the file and close it.
By adding this Import
statement, the rocket class can be used to create neat, deadly little missiles.
Modifying the launcher class
Remember, to actually fire a rocket, each launcher has some code inside its Update
method. So, you need to add some code there.
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.