Changeset 419:845e8e94219f


Ignore:
Timestamp:
04/09/11 15:54:52 (12 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Message:

Show recharge in tails

Location:
skaapsteker
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/levelscene.py

    r416 r419  
    244244            tail_pos = (self._clip_rect.left + fox_hud.TAILS_BG_MARGIN,
    245245                        self._clip_rect.top + fox_hud.TAIL_POSITIONS[tail])
    246             self._level_surface.blit(self._tails[tail][int(has_tail)], tail_pos)
     246
     247            if has_tail and tail in ('fireball', 'lightning'):
     248                imgs = self._tails[tail]
     249                size = imgs[0].get_size()
     250                area = pygame.Rect(0, 0, self._player.recharge_level(tail) * size[0], size[1])
     251                self._level_surface.blit(imgs[0], tail_pos)
     252                self._level_surface.blit(imgs[1], tail_pos, area)
     253            else:
     254                self._level_surface.blit(self._tails[tail][int(has_tail)], tail_pos)
    247255
    248256        # Draw the health bar
Note: See TracChangeset for help on using the changeset viewer.