American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

3 PM – Python Game Development

October 9, 2021 @ 3:00 pm - 4:00 pm

Today We Do
  1. When user click to purchase the tower, the self.coins are reduced according to the price of the tower.
  2. We made the tower to be able to shoot projectile or fireball. We made one tower type to launch up (90 degree) and down (270 degree) fireball. We made another tower type to launch all for diagonal angles (45, 125, 215 and 305 degrees).
Homework:
  1. Since you have 3 different types of tower, made the 3rd tower type (the most expensive tower) to be able to launch projectile/fireball in all 8 angles: 0,45,90,125,180,215,270,305.
  2. If you have more than one type of projectile (let say arrow and spear and fireballs), create one method for each projectile in main.py. The method should be very similar to what you already have. For Corey, Bradley and Raelyn, the method you should copy should be launch_fireball(self, x,y,direction) method. For Kyle and Anderson, the method you should copy should be create_projectile(self, x,y,direction). So you should have something like launch_fireball, launch_arrow, launch spear for examples. And then you should call these different methods from tower.py depending on the tower type.

Details

Date:
October 9, 2021
Time:
3:00 pm - 4:00 pm
Event Categories:
,
Verified by MonsterInsights