Mercurial > touhou
comparison pytouhou/game/bullet.py @ 152:86807b8a63bd
Add collisions with enemies and items.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 09 Oct 2011 15:32:43 -0700 |
parents | 5cf927cbd9c5 |
children | ebfd328e700c |
comparison
equal
deleted
inserted
replaced
151:5cf927cbd9c5 | 152:86807b8a63bd |
---|---|
103 self.update = self.update_full | 103 self.update = self.update_full |
104 self.set_anim() | 104 self.set_anim() |
105 if self.flags & 1: | 105 if self.flags & 1: |
106 self.speed_interpolator = Interpolator((self.speed + 5.,), 0, | 106 self.speed_interpolator = Interpolator((self.speed + 5.,), 0, |
107 (self.speed,), 16) | 107 (self.speed,), 16) |
108 | |
109 | |
110 def collide(self, player): | |
111 #TODO: animation | |
112 self._removed = True | |
113 player.die() | |
108 | 114 |
109 | 115 |
110 def update(self): | 116 def update(self): |
111 dx, dy = self.launch_delta | 117 dx, dy = self.launch_delta |
112 self.x += dx | 118 self.x += dx |