Mercurial > rinkhals
comparison gamelib/gameboard.py @ 381:7a58dadfd251
little cleanups, every sprite in its proper layer.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 25 Oct 2009 11:36:30 +0000 |
parents | 1586eccdefe4 |
children | e89e6ad011ac |
comparison
equal
deleted
inserted
replaced
380:1586eccdefe4 | 381:7a58dadfd251 |
---|---|
820 self.foxes.add(fox) | 820 self.foxes.add(fox) |
821 self.tv.sprites.append(fox) | 821 self.tv.sprites.append(fox) |
822 | 822 |
823 def add_building(self, building): | 823 def add_building(self, building): |
824 self.buildings.append(building) | 824 self.buildings.append(building) |
825 self.tv.sprites.append(building) | 825 self.tv.sprites.append(building, layer='buildings') |
826 | 826 |
827 def lay_eggs(self): | 827 def lay_eggs(self): |
828 self.eggs = 0 | 828 self.eggs = 0 |
829 for building in self.buildings: | 829 for building in self.buildings: |
830 if building.NAME in buildings.HENHOUSES: | 830 if building.NAME in buildings.HENHOUSES: |
881 self.tv.sprites.remove(chick) | 881 self.tv.sprites.remove(chick) |
882 | 882 |
883 def remove_building(self, building): | 883 def remove_building(self, building): |
884 if building in self.buildings: | 884 if building in self.buildings: |
885 self.buildings.remove(building) | 885 self.buildings.remove(building) |
886 self.tv.sprites.remove(building) | 886 self.tv.sprites.remove(building, layer='buildings') |
887 | 887 |
888 def add_cash(self, amount): | 888 def add_cash(self, amount): |
889 self.cash += amount | 889 self.cash += amount |
890 self.toolbar.update_cash_counter(self.cash) | 890 self.toolbar.update_cash_counter(self.cash) |
891 | 891 |