Stats tracking updated. Work on skull storms. Enemy death sound added for goblins. Various updates and fixes.

This commit is contained in:
Storm Dragon
2025-02-04 00:28:50 -05:00
parent 1d033e067a
commit 4f7f5504d1
12 changed files with 323 additions and 47 deletions

View File

@@ -3,8 +3,9 @@ from src.object import Object
from src.powerup import PowerUp
import random
class CoffinObject(Object):
def __init__(self, x, y, sounds):
def __init__(self, x, y, sounds, level):
super().__init__(
x, y, "coffin",
isStatic=True,
@@ -12,6 +13,7 @@ class CoffinObject(Object):
isHazard=False
)
self.sounds = sounds
self.level = level # Store level reference
self.is_broken = False
self.dropped_item = None
@@ -20,6 +22,8 @@ class CoffinObject(Object):
if not self.is_broken:
self.is_broken = True
self.sounds['coffin_shatter'].play()
self.level.player.stats.update_stat('Coffins broken', 1)
self.level.player.stats.update_stat('Coffins remaining', -1)
# Stop the ongoing coffin sound
if self.channel: