Changeset 318:bd137fdfe3c6


Ignore:
Timestamp:
04/08/11 22:29:03 (12 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
35343663333333366433306464653461393436613763333535643664373663643566393430303465
Message:

Draw tails

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/constants.py

    r314 r318  
    3434    HEALTH_WIDTH = 20
    3535    INVENTORY_SIZE = 48
     36
     37    TAIL_START = 100
     38    TAIL_OFFSET = 30
     39    TAIL_POSITIONS = {
     40            'shapeshift' : TAIL_START,
     41            'fireball' : TAIL_START + TAIL_OFFSET,
     42            'sprint' : TAIL_START + 2 * TAIL_OFFSET,
     43            'invisibility' : TAIL_START + 3 * TAIL_OFFSET,
     44            'flight' : TAIL_START + 4 * TAIL_OFFSET,
     45            'shield' : TAIL_START + 5 * TAIL_OFFSET,
     46            'steal' : TAIL_START + 6 * TAIL_OFFSET,
     47            'lightning' : TAIL_START + 7 * TAIL_OFFSET,
     48            }
  • skaapsteker/levelscene.py

    r315 r318  
    1212from . import physics
    1313from . import constants
     14from . import data
    1415from .sprites import player
    1516from .widgets.text import Text
     
    3536        self._world = physics.World()
    3637        self._paused = False
     38
     39        # Helper images for hud
     40        self._tofu = data.load_image('icons/tofu.png')
     41        self._scroll = data.load_image('icons/haiku-scroll.png')
     42        self._tail = data.load_image('icons/tail.png')
     43
    3744
    3845        for sprite in self._level.sprites:
     
    199206            self._level_surface.blit(self._player.inventory_image, inv_pos)
    200207
     208        # Draw tails
     209        # FIXME: Use correct tail icon
     210        for tail in fox.tails:
     211            tail_pos = self._clip_rect.left + 8, self._clip_rect.top + constants.FoxHud.TAIL_POSITIONS[tail]
     212            self._level_surface.blit(self._tail, tail_pos)
    201213
    202214
Note: See TracChangeset for help on using the changeset viewer.