Changeset 245
- Timestamp:
- 01/05/07 03:25:05 (5 years ago)
- Location:
- trunk/src/pyspacewar
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pyspacewar/ui.py
r244 r245 2011 2011 self.ships = self.game.ships 2012 2012 for ship in self.ships: 2013 ship.launch_effect = self.launch_effect_Ship 2013 2014 ship.bounce_effect = self.bounce_effect_Ship 2014 2015 ship.hit_effect = self.hit_effect_Ship … … 2270 2271 if not self.ai_controlled[player_id]: 2271 2272 self.ships[player_id].launch() 2273 2274 def launch_effect_Ship(self, ship, obstacle): 2275 """Play a sound effect when the player's ship bounces off something.""" 2276 player_id = self.ships.index(ship) 2277 if not self.ai_controlled[player_id]: 2272 2278 self.fire_sound.play() 2273 2279 -
trunk/src/pyspacewar/world.py
r241 r245 556 556 self.dead = False 557 557 self.spawn_time = 0 # the value of world.time when last respawned 558 self.launch_effect = None 558 559 self.hit_effect = None 559 560 self.explode_effect = None … … 689 690 self.velocity -= recoil 690 691 self.world.add(missile) 692 if self.launch_effect: 693 self.launch_effect(self, missile) 691 694 692 695
