- This event has passed.
1 PM – Python Game Development
May 7, 2022 @ 1:00 pm - 2:00 pm
Today:
- We went over the homework to animate the enemy and slow down the creation of the enemy sprite.
- We added a new tower for purchase and also added logic to create a floating tower when the target pointer collides with the nonfloating tower for purchase.
Homework:
- Create a new enemy_type attribute to the Enemy sprite. Make sure you modify create_enemy inside main.py to pass new enemy type.
- With the new enemy type, load the three different enemy types, 1, 2 or 3, depending on which value is passed in. As the wave progresses you should see the three different enemies get created.
- Create a new sprite called TowerHotspot which indicates where a new Tower can be placed. These sprites should use pygame.draw.rect — similar to how we draw hitboxes — to draw a 70 by 70 pink rectangle at the location passed in. Make sure you can draw one tower hotspot on the screen in a location of your choosing.