Mercurial > skaapsteker
diff skaapsteker/sprites/base.py @ 460:8b9b4706a4d6
Blocking NPC's block
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 09 Apr 2011 20:09:58 +0200 |
parents | f3ccb00df6a4 |
children | c6d1165bb16f |
line wrap: on
line diff
--- a/skaapsteker/sprites/base.py Sat Apr 09 20:50:01 2011 +0200 +++ b/skaapsteker/sprites/base.py Sat Apr 09 20:09:58 2011 +0200 @@ -281,6 +281,18 @@ OpenDialog.post(self) +class BlockingNPC(NPC): + + collides_with = set([PC_LAYER]) + mobile = False + block = True + + def setup(self, name, world, dsm, state, block): + NPC.setup(self, name, world, dsm, state) + self.block = block + self._animation = 'standing' + + class Projectile(AnimatedGameSprite): collision_layer = PROJECTILE_LAYER