Mercurial > touhou
comparison pytouhou/game/bullet.py @ 114:92772413b5a6
Fix special bullet function/flags handling
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Wed, 07 Sep 2011 00:29:12 +0200 |
parents | 2a03940deea3 |
children | 4300a832f033 |
comparison
equal
deleted
inserted
replaced
113:732c64662f87 | 114:92772413b5a6 |
---|---|
140 #TODO: check | 140 #TODO: check |
141 frame, count = self.attributes[0:2] | 141 frame, count = self.attributes[0:2] |
142 acceleration, angular_speed = self.attributes[4:6] | 142 acceleration, angular_speed = self.attributes[4:6] |
143 self.speed += acceleration | 143 self.speed += acceleration |
144 self.angle += angular_speed | 144 self.angle += angular_speed |
145 if self.frame == frame: | 145 if self.frame != 0 and self.frame % frame == 0: |
146 if count > 0: | 146 if count > 0: |
147 self.attributes[1] -= 1 | 147 self.attributes[1] -= 1 |
148 else: | 148 else: |
149 self.flags ^= 32 | 149 self.flags ^= 32 |
150 elif self.flags & 448: | 150 elif self.flags & 448: |
151 #TODO: check | 151 #TODO: check |
152 frame, count = self.attributes[0:2] | 152 frame, count = self.attributes[0:2] |
153 angle, speed = self.attributes[4:6] | 153 angle, speed = self.attributes[4:6] |
154 if frame == self.frame: | 154 if self.frame != 0 and self.frame % frame == 0: |
155 count = count - 1 | 155 count = count - 1 |
156 | 156 |
157 if self.flags & 64: | 157 if self.flags & 64: |
158 self.angle = self.angle + angle | 158 self.angle = self.angle + angle |
159 elif self.flags & 128: | 159 elif self.flags & 128: |