- This event has passed.
7 PM – Python Game Development – Gamas
November 18, 2022 @ 7:00 pm - 8:00 pm
Homework
We want to make bug falls down when hit by target
- Load the assets/bugs/dizzy/frame-1.png and frame-2.png into self.dizzy_images
- Create self.bug_mode = FLYING_MODE . You have to define FLYING_MODE and DIZZY_MODE in config.py
- Inside bug.py in the next_costume() method, you need to check if you need to use dizzy_images or flying_images.
- When bug is hit by target, change bug_mode to DIZZY_MODE. Look at how we did this in Flappy Bird project.
- Inside bug.py, inside update() when self.bug_mode == DIZZY_MODE, change the movement to go down instead of moving left or right.