Time for action - inter-cycle collisions
We're going to use the files from last chapter's Have a Go hero section to proceed. If we didn't complete that section, that's fine. Files have been provided that we can use instead.
- Open the cycle class file we made during the previous chapter's Have a Go hero section, or open the file
CycleClassHero.py in the
- Resave the file as
CycleClass_01.py in the
- For this collision system, we're going to have a unique name for each cycle on the track. We also need to be able to put the cycles in different spots on the track so they don't start on top of each other. Change the definition of the
__init__ to look like this:
def __init__(self, inputManager, track, startPos, name, ai = ...