comparison pytouhou/game/enemy.py @ 309:14c9aca8e274

Implement Remilia's laser webs.
author Thibaut Girka <thib@sitedethib.com>
date Wed, 14 Mar 2012 11:28:15 +0100
parents 5930b33a0370
children 550ec10cccbc
comparison
equal deleted inserted replaced
308:7a464291dd9d 309:14c9aca8e274
166 166
167 167
168 def new_laser(self, variant, laser_type, sprite_idx_offset, angle, speed, 168 def new_laser(self, variant, laser_type, sprite_idx_offset, angle, speed,
169 start_offset, end_offset, max_length, width, 169 start_offset, end_offset, max_length, width,
170 start_duration, duration, end_duration, 170 start_duration, duration, end_duration,
171 grazing_delay, grazing_extra_duration, unknown): 171 grazing_delay, grazing_extra_duration, unknown,
172 ox, oy = self.bullet_launch_offset 172 offset=None):
173 ox, oy = offset or self.bullet_launch_offset
173 launch_pos = self.x + ox, self.y + oy 174 launch_pos = self.x + ox, self.y + oy
174 if variant == 86: 175 if variant == 86:
175 angle += self.get_player_angle(self.select_player(), launch_pos) 176 angle += self.get_player_angle(self.select_player(), launch_pos)
176 laser = Laser(launch_pos, self._game.laser_types[laser_type], 177 laser = Laser(launch_pos, self._game.laser_types[laser_type],
177 sprite_idx_offset, angle, speed, 178 sprite_idx_offset, angle, speed,