Tinting no longer happens when enemy misses.
Justin Armstrong justinmeister@gmail.com
Wed, 30 Apr 2014 10:43:35 -0700
2 files changed,
3 insertions(+),
2 deletions(-)
M
data/components/person.py
→
data/components/person.py
@@ -421,7 +421,7 @@ Put a red overlay over sprite to indicate damage.
""" if self.damaged: self.image = copy.copy(self.spritesheet_dict['facing left 2']) - self.image = pg.transform.scale2x(self.image) + self.image = pg.transform.scale2x(self.image).convert_alpha() damage_image = copy.copy(self.image).convert_alpha() damage_image.fill((255, 0, 0, self.damage_alpha), special_flags=pg.BLEND_RGBA_MULT) self.image.blit(damage_image, (0, 0))
M
data/observer.py
→
data/observer.py
@@ -108,7 +108,8 @@ self.info_box.state = c.DISPLAY_ENEMY_ATTACK_DAMAGE
self.level.state = c.DISPLAY_ENEMY_ATTACK_DAMAGE self.level.set_timer_to_current_time() self.level.player_damaged(player_damage) - self.player.damaged = True + if player_damage: + self.player.damaged = True def player_attack(self): enemy_posx = self.arrow.rect.x + 60