Changeset 339:a9d760134706


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

Rename ItemRepopulationEvent to AddSprite before repurposing it for fireballs.

Location:
skaapsteker
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/engine.py

    r290 r339  
    154154
    155155
    156 class ItemRepopulationEvent(UserEvent): # TODO: Needed?
     156class AddSpriteEvent(UserEvent):
    157157
    158     utype = "ITEM_REPOPULATION_EVENT"
     158    utype = "ADD_SPRITE_EVENT"
    159159
    160160    @classmethod
    161161    def post(cls, item):
    162         """Put a Sprite back in the world.
     162        """Put a Sprite into the world.
    163163           """
    164         super(ItemRepopulationEvent, cls).post(item=item)
     164        super(AddSpriteEvent, cls).post(item=item)
  • skaapsteker/levelscene.py

    r324 r339  
    299299        elif engine.CloseDialog.matches(ev):
    300300            self._close_dialogue()
    301         elif engine.ItemRepopulationEvent.matches(ev):
     301        elif engine.AddSpriteEvent.matches(ev):
    302302            self._world.add(ev.item)
  • skaapsteker/sprites/player.py

    r336 r339  
    88from ..constants import Layers
    99from ..data import get_files, load_image
    10 from ..engine import PlayerDied, ItemRepopulationEvent
     10from ..engine import PlayerDied, AddSpriteEvent
    1111
    1212
     
    244244        self.attacking = 2
    245245        self._last_time = time.time() # Reset the animation clock
     246        #FireProjectile.push()
    246247
    247248    def _lightning_attack(self):
     
    336337            return
    337338        self.discard_item()
    338         ItemRepopulationEvent.post(sprite)
     339        AddSpriteEvent.post(sprite)
    339340
    340341
Note: See TracChangeset for help on using the changeset viewer.