American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Adv Python Game Dev – Gamas

July 27, 2023 @ 6:00 pm - 7:00 pm

Today We Did
  1. We added “region <region>” information on the screen for debugging purposes.
  2. We added EnemyTwo class which inherits from Enemy class. This way we can override the self.images used for 2nd enemy type.
Homework
  1. Inside EnemyTwo.__init__(…) method, you need to load images from “assets/images/monster-character-2d-sprites/PNG/2/2_enemies_1_RUN_00{id}.png” .
  2. After you do this, inside main.py use EnemyTwo instead of Enemy class this way, EnemyTwo images will be shown
  3. Inside Enemy class, add one more attribute self.health = 100
  4. Inside Enemy class, load the heart image (“assets/images/heart.png”)
    and display it next to the monster image. This is very similar to again Shoot Balloon “bad balloon” text but instead of text, you want to blit the heart image.
  5. Inside Enemy class, blit the self.health next to heart image.
  6. Look at below screenshot for reference

Details

Date:
July 27, 2023
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights