- This event has passed.
5 PM – Intro To Python – Darin
March 18 @ 5:00 pm - 6:00 pm
What We Did Today:
- Made our code tidier by using a get_next_image method inside of the bird class
- Created our player class which spawns a player in our screen
- Made the player sprite move around using keys_pressed[pygame.K_{whatever button the user presses}]
- Made our birds flip in image when going from the right to the left
- Made our player flip in image when going towards the left and when going towards the right
Homework:
For your homework, flip the birds image (ONLY THE BIRD's) using pygame.transform.flip(self.image, True, False) It is your job to figure out where to add the flip function, but how it works is that the True in the function above means you want to flip it around horizontally and the False means you flip it around vertically So self.image = pygame.transform.flip(self.image, False, True) makes your image upside down without flipping it horizontally.
when you are done submitting this, by Sunday night I will leave comments to your homework so you will need to update your project from the upper left, and if it asks you to merge, merge yours
Notes:
If you have any questions, feel free to email me at ddjapri@ayclogic.com