Mercurial > rinkhals
comparison gamelib/animations.py @ 395:2d0ff46118e2
Basic support for z coordinate
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 12 Nov 2009 21:14:21 +0000 |
parents | 7a58dadfd251 |
children | e65536ca215b |
comparison
equal
deleted
inserted
replaced
394:ad77b3b71b08 | 395:2d0ff46118e2 |
---|---|
31 tv.sprites.remove(self, layer=self.layer) | 31 tv.sprites.remove(self, layer=self.layer) |
32 | 32 |
33 class WeaponAnimation(Animation): | 33 class WeaponAnimation(Animation): |
34 def __init__(self, tv, wielder, layer='animations'): | 34 def __init__(self, tv, wielder, layer='animations'): |
35 if wielder.facing == 'right': | 35 if wielder.facing == 'right': |
36 Animation.__init__(self, tv, wielder.pos.to_tuple(), self.SEQUENCE_RIGHT, layer=layer) | 36 Animation.__init__(self, tv, wielder.pos.to_tile_tuple(), self.SEQUENCE_RIGHT, layer=layer) |
37 else: | 37 else: |
38 Animation.__init__(self, tv, wielder.pos.to_tuple(), self.SEQUENCE_LEFT, layer=layer) | 38 Animation.__init__(self, tv, wielder.pos.to_tile_tuple(), self.SEQUENCE_LEFT, layer=layer) |
39 | 39 |
40 | 40 |
41 class MuzzleFlash(WeaponAnimation): | 41 class MuzzleFlash(WeaponAnimation): |
42 FLASH_LEFT = imagecache.load_image('sprites/muzzle_flash.png') | 42 FLASH_LEFT = imagecache.load_image('sprites/muzzle_flash.png') |
43 FLASH_RIGHT = imagecache.load_image('sprites/muzzle_flash.png', ("right_facing",)) | 43 FLASH_RIGHT = imagecache.load_image('sprites/muzzle_flash.png', ("right_facing",)) |