Changeset 342:8f578fe33fe7


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

Immolation fox.

Location:
skaapsteker/sprites
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/base.py

    r336 r342  
    3333        self.setup(**opts)
    3434
     35    def setup(self):
     36        pass
    3537
    3638    def setup_image_data(self, pos):
     
    9294        self.setup(**opts)
    9395
     96    def setup(self):
     97        pass
     98
    9499    def _update_image(self, force=False):
    95100        if self.facing:
  • skaapsteker/sprites/player.py

    r340 r342  
    55
    66from ..sprites.base import find_sprite, TILE_SIZE, PC_LAYER, MONSTER_LAYER
     7from ..sprites.projectiles import Fireball
    78from ..physics import Sprite
    89from ..constants import Layers
     
    244245        self.attacking = 2
    245246        self._last_time = time.time() # Reset the animation clock
    246         #FireProjectile.push()
     247        AddSpriteEvent.post(Fireball(self.get_tile_pos()))
    247248
    248249    def _lightning_attack(self):
     
    317318
    318319
     320    def get_tile_pos(self):
     321        return [a/b for a, b in zip(self.rect.center, TILE_SIZE)]
     322
    319323    def get_sprite(self, set_level):
    320324        my_item = self._me.item
     
    324328        if set_level:
    325329            world_item.level = self._me.level
    326             world_item.pos = [a/b for a, b in zip(self.rect.center, TILE_SIZE)]
     330            world_item.pos = self.get_tile_pos()
    327331        sprite_dict = world_item.copy()
    328332        sprite_dict.pop('level')
  • skaapsteker/sprites/projectiles.py

    r336 r342  
    11"""Things people throw at each other."""
    22
    3 from .sprites import Projectile
     3from .base import Projectile
    44
    55class Fireball(Projectile):
     
    77    gravitates = True
    88
    9     image_dir = 'sprites/fireball'
     9    image_dir = 'sprites/attacks/fireball'
    1010    animation_regexes = [
    1111        ("raining_death", r"^fireball-\d+.png$"),
Note: See TracChangeset for help on using the changeset viewer.