28 May Aurora Wednesday Saturday Python Homework 20.05.27.
Posted at 01:13h in Uncategorized 0 Comments
Modify the program we made in the class to:
- Add one missile to your program
- missile will automatically move from your spaceship to the top of the screen
- once missile reach the top of the screen, it will re-appear from the location of your fighter
- exam the code of move method in the Missile class and find out the logic of its movement.
- you can assign the fighter’s location to the the missile’s location like this:
self.rect = location (when the missile reach out the top of the screen)
- so far we could consider xxxxx.rect represents for the location, such as myFighter.rect is the location of object myFighter. We could pass the value of myFighter.rect as arguments into to the move method of Missile class.
Sorry, the comment form is closed at this time.