diff gamelib/animal.py @ 380:1586eccdefe4

Ripped out legacy animation infrastructure in favour of layered sprites.
author Jeremy Thurgood <firxen@gmail.com>
date Sun, 25 Oct 2009 10:56:01 +0000
parents 71f5897ac5ef
children 463802281182
line wrap: on
line diff
--- a/gamelib/animal.py	Sat Oct 24 21:43:15 2009 +0000
+++ b/gamelib/animal.py	Sun Oct 25 10:56:01 2009 +0000
@@ -45,7 +45,7 @@
         if hasattr(self, 'DEATH_SOUND'):
             sound.play_sound(self.DEATH_SOUND)
         if hasattr(self, 'DEATH_ANIMATION'):
-            gameboard.animations.append(self.DEATH_ANIMATION(self.pos))
+            self.DEATH_ANIMATION(gameboard.tv, self.pos.to_tuple())
         self._game_death(gameboard)
 
     def _game_death(self, gameboard):
@@ -474,7 +474,7 @@
         """Setup dig parameters, to be overridden if needed"""
         self.tick = 0 # Costs us nothing to go through a fence.
         self.dig_pos = dig_pos
-        gameboard.animations.append(self.DIG_ANIMATION(dig_pos))
+        self.DIG_ANIMATION(gameboard.tv, dig_pos.to_tuple())
         self._make_hole(gameboard)
 
 class GreedyFox(Fox):