Mercurial > rinkhals
comparison gamelib/gameboard.py @ 251:844bfb23d4b6
Refactored animal death and added death animations.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 12:35:37 +0000 |
parents | 5b9cd693fe7c |
children | e12b39132ffb |
comparison
equal
deleted
inserted
replaced
250:048510e95812 | 251:844bfb23d4b6 |
---|---|
757 # new chick it dies. :/ Farm life | 757 # new chick it dies. :/ Farm life |
758 # is cruel. | 758 # is cruel. |
759 self.toolbar.update_egg_counter(self.eggs) | 759 self.toolbar.update_egg_counter(self.eggs) |
760 | 760 |
761 def kill_fox(self, fox): | 761 def kill_fox(self, fox): |
762 if fox in self.foxes: | 762 self.killed_foxes += 1 |
763 if not fox.survive_damage(): | 763 self.toolbar.update_fox_counter(self.killed_foxes) |
764 self.killed_foxes += 1 | 764 self.add_cash(constants.SELL_PRICE_DEAD_FOX) |
765 self.toolbar.update_fox_counter(self.killed_foxes) | 765 self.remove_fox(fox) |
766 self.add_cash(constants.SELL_PRICE_DEAD_FOX) | |
767 self.remove_fox(fox) | |
768 | 766 |
769 def remove_fox(self, fox): | 767 def remove_fox(self, fox): |
770 self.foxes.discard(fox) | 768 self.foxes.discard(fox) |
771 if fox in self.tv.sprites: | 769 if fox in self.tv.sprites: |
772 self.tv.sprites.remove(fox) | 770 self.tv.sprites.remove(fox) |