Some minor cleanup.
This commit is contained in:
@@ -29,7 +29,7 @@ class PowerUp(Object):
|
||||
|
||||
# Update position
|
||||
new_x = self._currentX + self.direction * self.speed
|
||||
|
||||
|
||||
# Check boundaries and bounce if needed
|
||||
if new_x < self.left_boundary:
|
||||
self._currentX = self.left_boundary
|
||||
@@ -55,7 +55,7 @@ class PowerUp(Object):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def apply_effect(self, player):
|
||||
"""Apply the item's effect when collected"""
|
||||
if self.item_type == 'hand_of_glory':
|
||||
@@ -99,7 +99,7 @@ class PowerUp(Object):
|
||||
# Tell level to spawn a spider
|
||||
if hasattr(self, 'level'):
|
||||
self.level.spawn_spider(self.xPos, self.yPos)
|
||||
|
||||
|
||||
# Stop movement sound when collected
|
||||
if self.channel:
|
||||
self.channel.stop()
|
||||
|
||||
Reference in New Issue
Block a user