American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

3 PM – Python Game Development

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

Today We Do

  1. Before when we spawn the Tower, it always spawn the same tower over and over again regardless of which tower that we purchase. We fix this problem so the tower span is according to the Tower that the player purchase.

Homework

Everyone
  1. Fix the TowerHotspot locations so when you spawn tower, it will not spawn the tower on the road.
  2. When you click the TowerForPurchase sprite, you need to reduce the self.coins according to the tower_for_purchase.price. You need to do this inside main.py, I think the name of the method is tower_purchase_mouse_collision(self, tower, mouse). If self.coins is less than tower_for_purchase.price, prevent the user from purchasing the tower. To prevent spawning of the tower, in your code, you should avoid creating TowerForPurchase.
Raelyn, Corey, Bradley
  1. If you did not do last week homework, please do them. If you don’t do them, you will get left behind and it is not fair to ask other students to wait for you if you don’t do your homework.
  2. I still see the enemy movement is not exactly on the road, you have to fix this too.
  3. The tower is the one that is supposed to launch projectile/fireball. In order to do this, we need to do the following
    • in main.py, stop calling launch_fireball(self) from game_in_session(self).
    • Add 3 more parameters in launch_fireball method so it would be launch_fireball(self,x, y, direction)
    • After you do this, we will make the tower launch the projectile next week in the class.

 

Details

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