- This event has passed.
6 PM – Python Game Development
June 19, 2020 @ 6:00 pm - 7:00 pm
- Homework
- Inside Player class
- Create 2 more images in __init__:
- rename imageA to imageA_right.
- rename imageB to imageB_right.
- imageA_left. Flip the imageA_right and assign it to imageA_left.
- imageB_left. Flip the imageB_right and assign it to imageB_left.
- When “a” keyboard is pressed
- you need to set self.direction = 270
- you need to change the image to imageA_left
- When “d” keyboard is pressed
- you need to set self.direction = 90
- you need to change the image to imageA_right
- When you flap the wing:
- Check the self.direction to decide whether you need to use the left or the right image
- Create 2 more images in __init__:
- Inside Player class