comparison pytouhou/games/eosd.py @ 200:300661f2ae8a

Fix orbs' original position
author Thibaut Girka <thib@sitedethib.com>
date Mon, 31 Oct 2011 17:54:06 +0100
parents 8ec34c56fed0
children eca53abdfeab
comparison
equal deleted inserted replaced
199:8ec34c56fed0 200:300661f2ae8a
119 self.bulletB_type = BulletType(self.anm_wrapper, 66, 98, 0, 0, 0, hitbox_size=4, damage=12) #TODO: verify the hitbox. 119 self.bulletB_type = BulletType(self.anm_wrapper, 66, 98, 0, 0, 0, hitbox_size=4, damage=12) #TODO: verify the hitbox.
120 self.bulletB_speed = 22. 120 self.bulletB_speed = 22.
121 121
122 self.orbs = [Orb(self.anm_wrapper, 128, self.state, self.orb_fire), 122 self.orbs = [Orb(self.anm_wrapper, 128, self.state, self.orb_fire),
123 Orb(self.anm_wrapper, 129, self.state, self.orb_fire)] 123 Orb(self.anm_wrapper, 129, self.state, self.orb_fire)]
124 self.orbs[0].dx = -24 124 self.orbs[0].offset_x = -24
125 self.orbs[1].dx = 24 125 self.orbs[1].offset_x = 24
126 126
127 127
128 def fire_spine(self, orb, offset_x): 128 def fire_spine(self, orb, offset_x):
129 bullets = self._game.players_bullets 129 bullets = self._game.players_bullets
130 nb_bullets_max = self._game.nb_bullets_max 130 nb_bullets_max = self._game.nb_bullets_max
172 self.fire_spine(orb, -12) 172 self.fire_spine(orb, -12)
173 self.fire_spine(orb, 12) 173 self.fire_spine(orb, 12)
174 if self.fire_time % 5 == 0: 174 if self.fire_time % 5 == 0:
175 self.fire_spine(orb, 0) 175 self.fire_spine(orb, 0)
176 176
177
178 def update(self, keystate):
179 Player.update(self, keystate)
180 177
181 178
182 class Marisa(Player): 179 class Marisa(Player):
183 def __init__(self, state, game, resource_loader): 180 def __init__(self, state, game, resource_loader):
184 anm_wrapper = resource_loader.get_anm_wrapper(('player01.anm',)) 181 anm_wrapper = resource_loader.get_anm_wrapper(('player01.anm',))
211 (0, 0, 0, 0, 0., 0., 0., 0.), 208 (0, 0, 0, 0, 0., 0., 0., 0.),
212 0, self, self._game, player_bullet=True)) 209 0, self, self._game, player_bullet=True))
213 bullet_angle += self.bullet_angle 210 bullet_angle += self.bullet_angle
214 211
215 212
213
216 class MarisaA(Marisa): 214 class MarisaA(Marisa):
217 def __init__(self, state, game, resource_loader): 215 def __init__(self, state, game, resource_loader):
218 Marisa.__init__(self, state, game, resource_loader) 216 Marisa.__init__(self, state, game, resource_loader)
219 217
220 #TODO: verify the hitbox and damages. 218 #TODO: verify the hitbox and damages.
231 if self.state.power < 8: 229 if self.state.power < 8:
232 return 230 return
233 231
234 else: 232 else:
235 pass #TODO 233 pass #TODO
234
236 235
237 236
238 class MarisaB(Marisa): 237 class MarisaB(Marisa):
239 def __init__(self, state, game, resource_loader): 238 def __init__(self, state, game, resource_loader):
240 Marisa.__init__(self, state, game, resource_loader) 239 Marisa.__init__(self, state, game, resource_loader)
258 if self.state.power < 8: 257 if self.state.power < 8:
259 return 258 return
260 259
261 else: 260 else:
262 pass #TODO 261 pass #TODO
262