Fortunately, we'll be able to do a good bit of copying and pasting code we've already written to make the main cannon. Let's get started.
ExplosionClasses_01.py. The first thing we'll do is to make a new kind of explosion for the main cannon.
from pandac.PandaModules import *
Popclass and paste it into the bottom of the file. Change the class name to
Boom, and use the find and replace feature of Notepad++ to change
self.boomeverywhere it appears in the
__init__method for the
Boomclass to look like this:
def __init__(self, pos, scale, damage):