diff skaapsteker/sprites/player.py @ 410:115e738e209c

Become visible when attacking. Enemies shouldn't attack invisible foxes.
author Simon Cross <hodgestar@gmail.com>
date Sat, 09 Apr 2011 17:30:09 +0200
parents bbfc2cc07ba4
children a5f54ae9217e
line wrap: on
line diff
--- a/skaapsteker/sprites/player.py	Sat Apr 09 17:26:25 2011 +0200
+++ b/skaapsteker/sprites/player.py	Sat Apr 09 17:30:09 2011 +0200
@@ -300,6 +300,7 @@
             self.drop_item()
 
     def _bite_attack(self):
+        self.invisible = 0
         self.attacking = 2
         self._last_time = time.time() # Reset the animation clock
 
@@ -312,11 +313,13 @@
         AddSpriteEvent.post(projectile)
 
     def _fireball_attack(self):
+        self.invisible = 0
         self.attacking = 2
         self._last_time = time.time() # Reset the animation clock
         self._launch_projectile(Fireball)
 
     def _lightning_attack(self):
+        self.invisible = 0
         self.attacking = 2
         self._last_time = time.time() # Reset the animation clock
         self._launch_projectile(Lightning)