To start with, we're going to make a simple class for the track in our game and import it into our main file.
chp04_07.pyand resave it in the
class Track: def __init__(self):
WorldClass_01.py, specifically the lines where we load our track, reparent it, and reposition it. Once you've copied the lines to the clipboard, you can delete them from the
WorldClass_01.pyfile. These are the lines we're referring to:
self.track = loader.loadModel("../Models/Track.egg") ...