For this lesson, we're going to make a second task to move self.cycle2
. Then we're going to remove both of the cycles' movement tasks at the same time. We'll use remove
first, and then we'll do it again with removeTasksMatching.
First off, we don't want the cycle tasks removing themselves prematurely, so we need to delete the
return task.done
fromcycleMove
. Take out theif
statement that triggers it as well, we don't need that anymore either. While we're at it, we should remove the lines that referenceself.distTrav
as well.To keep our command prompt from getting too cluttered, we should delete the line in
cycleMove
that prints delta time,print(dt)
. After that, copy the entirecycleMove
method and paste a copy in beneath the original. Rename the original tocycleMove1
and rename the copy tocycleMove2
. Finally, incycleMove2
, change all the references toself.cycle1
toself.cycle2
. We can use Notepad++'s Find and Replace dialogue to do this. Bring...