Ignore:
Timestamp:
09/06/13 22:42:09 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Message:

Use Result to handle enemy death (but keep the event for accounting purposes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r385 r391  
    99    COLLISION_TYPE_FURNITURE, COLLISION_TYPE_WEREWOLF_ATTACK,
    1010    CMD_TOGGLE_FORM, CMD_ACTION)
    11 from nagslang.enemies import DeadEnemy
    1211from nagslang.events import (
    13     ScreenChange, DoorEvent, FireEvent, EnemyDeathEvent, ClawEvent)
     12    ScreenChange, DoorEvent, EnemyDeathEvent, FireEvent, ClawEvent)
    1413from nagslang.level import Level
    1514from nagslang.screens.base import Screen
     
    186185        elif EnemyDeathEvent.matches(ev):
    187186            self.world.kills += 1
    188             dead_enemy = DeadEnemy(self.space, self.world, ev.position,
    189                                    ev.enemy_type)
    190             self._drawables.add(dead_enemy)
    191187        elif ClawEvent.matches(ev):
    192188            claw_attack = ClawAttack(self.space, ev.source, ev.vector,
Note: See TracChangeset for help on using the changeset viewer.