Ignore:
Timestamp:
Sep 5, 2013, 10:36:14 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Message:

Enemies leave corpses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r307 r308  
    77from nagslang.constants import (
    88    COLLISION_TYPE_WALL, COLLISION_TYPE_PLAYER, CALLBACK_COLLIDERS)
    9 from nagslang.events import ScreenChange, DoorEvent, FireEvent
     9from nagslang.enemies import DeadEnemy
     10from nagslang.events import ScreenChange, DoorEvent, FireEvent, EnemyDeathEvent
    1011from nagslang.level import Level
    1112from nagslang.screens.base import Screen
     
    151152                            ev.source_collision_type)
    152153            self._drawables.add(bullet)
     154        elif EnemyDeathEvent.matches(ev):
     155            self.world.kills += 1
     156            dead_enemy = DeadEnemy(self.space, self.world, ev.position,
     157                                   ev.enemy_type)
     158            self._drawables.add(dead_enemy)
    153159        self.keys.handle_event(ev)
    154160
Note: See TracChangeset for help on using the changeset viewer.