Mercurial > skaapsteker
changeset 419:845e8e94219f
Show recharge in tails
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 09 Apr 2011 17:54:52 +0200 |
parents | c6e9b3006ef9 |
children | d6bc6484b7ac |
files | skaapsteker/levelscene.py skaapsteker/sprites/__init__.pyc skaapsteker/sprites/base.pyc skaapsteker/sprites/enemies.pyc skaapsteker/sprites/items.pyc skaapsteker/sprites/npcs.pyc skaapsteker/sprites/player.pyc skaapsteker/sprites/projectiles.pyc |
diffstat | 8 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/skaapsteker/levelscene.py Sat Apr 09 17:51:36 2011 +0200 +++ b/skaapsteker/levelscene.py Sat Apr 09 17:54:52 2011 +0200 @@ -243,7 +243,15 @@ has_tail = tail in fox.tails tail_pos = (self._clip_rect.left + fox_hud.TAILS_BG_MARGIN, self._clip_rect.top + fox_hud.TAIL_POSITIONS[tail]) - self._level_surface.blit(self._tails[tail][int(has_tail)], tail_pos) + + if has_tail and tail in ('fireball', 'lightning'): + imgs = self._tails[tail] + size = imgs[0].get_size() + area = pygame.Rect(0, 0, self._player.recharge_level(tail) * size[0], size[1]) + self._level_surface.blit(imgs[0], tail_pos) + self._level_surface.blit(imgs[1], tail_pos, area) + else: + self._level_surface.blit(self._tails[tail][int(has_tail)], tail_pos) # Draw the health bar health_bottom = self._clip_rect.right - 30, self._clip_rect.top + 200