- This event has passed.
7 PM – Advanced Python Game Development
October 27, 2021 @ 7:00 pm - 8:00 pm
Today:
- We went over the homework
- We made the bullet shoot in the direction the turret is facing.
Homework:
- Add a cool-down period that enforces a minimum time between when the tank can shoot bullets.
- Add logic to prevent the tank from moving through the brick wall.
- Keep track of a prev_x and prev_y attributes.
- If the tank collides with the brick, then set the x value to the prev_x and the y equal to the prev_y.
- If the brick wall is exploded, you can pass through it.
- Start the bullet moving from the center of the turret rather than the upper left corner of the tank. You can use the turrets self.center_x, and self.center_y values.