26 Dec Monday 20:00 Python Practice 20.12.21.
Question 1:
Continue modify the program we made in the class:
- 
- to use spritecollide to let the fighter collect energy crystals,
- Create a variable score, if the energy crystal is collected, the score will increase
 
Question 2:
In the class Laser and Explosion. We showed you how to load different image to switch costumes.
- 
-  Please made a class Planet, it will contains following methods:
__init__(self) - It initials the Planet from a random centerx position, and top = -1000 Since planets has 3 possible images(you could down load planet images from the following link, http://www.torontokidscomputer.com/code/pygame/ 
 you need initialize the planet with a random image. update(self) - It will move down by 2px every time call the update method.
 If Bottom of the image reaches 1000, the new random planet will starts from a random centerx position, and top = -1000
- create planet sprite and call the update() method in the main program. so planet can appear on the screen and start move down.
 
-  Please made a class Planet, it will contains following methods:
 
									 
									
No Comments