changeset 210:f5be441d2c42

Implement collidable boolean of enemy.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 22 Nov 2011 20:51:35 +0100
parents 005ea47e11e0
children a765ef90c2b0
files pytouhou/game/enemy.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/game/enemy.py
+++ b/pytouhou/game/enemy.py
@@ -39,6 +39,7 @@ class Enemy(object):
         self.life = 1 if life < 0 else life
         self.max_life = life
         self.touchable = True
+        self.collidable = True
         self.damageable = True
         self.death_flags = 0
         self.boss = False
@@ -250,7 +251,7 @@ class Enemy(object):
                 self.drop_particles(1, 1)
 
         # Check for enemy-player collisions
-        if self.touchable:
+        if self.collidable:
             for player in self._game.players:
                 if not player.state.touchable:
                     continue