Extra life added, fixed sounds to use the new functions for volume control Other various improvements.
This commit is contained in:
		| @@ -37,9 +37,7 @@ class Pumpkin: | ||||
|             # Calculate volume and pan for splat sound based on final position | ||||
|             volume, left, right = calculate_volume_and_pan(playerX, self.x) | ||||
|             if volume > 0:  # Only play if within audible range | ||||
|                 channel = sounds["pumpkin_splat"].play() | ||||
|                 if channel: | ||||
|                     channel.set_volume(volume * left, volume * right) | ||||
|                 obj_play(sounds, 'pumpkin_splat', playerX, self.x, loop=False) | ||||
|  | ||||
|     def check_collision(self, player): | ||||
|         """Check if pumpkin hits player""" | ||||
| @@ -78,7 +76,7 @@ class Catapult(Object): | ||||
|         self.lastFireTime = currentTime | ||||
|          | ||||
|         # Play launch sound | ||||
|         self.sounds['catapult_launch'].play() | ||||
|         play_sound(self.sounds['catapult_launch']) | ||||
|          | ||||
|         # Set up pending pumpkin | ||||
|         isHigh = random.choice([True, False]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user