Changeset 346:077f43eb4145


Ignore:
Timestamp:
04/09/11 11:30:26 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Message:

Hook up smaller fireball images. Set fireball facing.

Location:
skaapsteker/sprites
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/player.py

    r342 r346  
    245245        self.attacking = 2
    246246        self._last_time = time.time() # Reset the animation clock
    247         AddSpriteEvent.post(Fireball(self.get_tile_pos()))
     247        fireball = Fireball(self.get_tile_pos())
     248        fireball.facing = self.facing
     249        AddSpriteEvent.post(fireball)
    248250
    249251    def _lightning_attack(self):
  • skaapsteker/sprites/projectiles.py

    r342 r346  
    11"""Things people throw at each other."""
     2
     3from pygame import transform
    24
    35from .base import Projectile
     
    911    image_dir = 'sprites/attacks/fireball'
    1012    animation_regexes = [
    11         ("raining_death", r"^fireball-\d+.png$"),
     13        ("raining_death", r"^fireball-\d+-sm.png$"),
    1214    ]
     15
     16    facings = {
     17        "raining_death" : (
     18            ('left', None),
     19            ('right', lambda x: transform.flip(x, True, False))),
     20    }
    1321
    1422    def collided_player(self, player):
Note: See TracChangeset for help on using the changeset viewer.