American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

1 PM – Python Game Development

May 7, 2022 @ 1:00 pm - 2:00 pm

Today:

  1. We went over the homework to animate the enemy and slow down the creation of the enemy sprite.
  2. 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:

  1. Create a new enemy_type attribute to the Enemy sprite. Make sure you modify create_enemy inside main.py to pass new enemy type.
  2. 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.
  3. 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.

Details

Date:
May 7, 2022
Time:
1:00 pm - 2:00 pm
Verified by MonsterInsights