Mercurial > touhou
diff pytouhou/game/player.py @ 156:ebfd328e700c
Rename a few functions, move a few things around...
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Mon, 10 Oct 2011 18:34:36 +0200 |
parents | 86807b8a63bd |
children | 7769ce7be03c |
line wrap: on
line diff
--- a/pytouhou/game/player.py +++ b/pytouhou/game/player.py @@ -69,7 +69,7 @@ class Player(object): self._anmrunner.run_frame() - def die(self): + def collide(self): self.state.lives -= 1 self.state.x = 192.0 self.state.y = 384.0 @@ -77,6 +77,12 @@ class Player(object): #TODO: set invulnerability. + def collect(self, item): + #TODO + self.state.score += item._item_type.score + item._removed = True + + def update(self, keystate): try: dx, dy = {16: (0.0, -1.0), 32: (0.0, 1.0), 64: (-1.0, 0.0), 128: (1.0, 0.0),