Mercurial > fife-parpg
diff demos/shooter/scripts/ships/enemies.py @ 474:10aff123c62c
Some minor code cleanups.
Changed the player ship controls a little to feel more natural.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 21 Apr 2010 16:49:59 +0000 |
parents | 3164715a0621 |
children | afde89c1d50b |
line wrap: on
line diff
--- a/demos/shooter/scripts/ships/enemies.py Tue Apr 20 20:36:58 2010 +0000 +++ b/demos/shooter/scripts/ships/enemies.py Wed Apr 21 16:49:59 2010 +0000 @@ -32,21 +32,18 @@ super(EnemyActionListener, self).__init__(ship) def onInstanceActionFinished(self, instance, action): - if action.getId() == 'explode': - self._ship.removeFromScene() - super(EnemyActionListener, self).onInstanceActionFinished(instance, action) + class BossActionListener(ShipActionListener): def __init__(self, ship): super(BossActionListener, self).__init__(ship) def onInstanceActionFinished(self, instance, action): + super(BossActionListener, self).onInstanceActionFinished(instance, action) + if action.getId() == 'explode': - self._ship.removeFromScene() self._ship.endLevel() - - super(BossActionListener, self).onInstanceActionFinished(instance, action) class Saucer1(Ship):