Removed the unneeded direction parameter from catapults. No longer has to be included in the json file, won't cause crash.

This commit is contained in:
Storm Dragon
2025-02-08 21:26:08 -05:00
parent bcaa4f7f17
commit 740ec3e825
5 changed files with 7 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ class Pumpkin:
def __init__(self, x, isHigh, direction, playerMaxHealth):
self.x = x
self.isHigh = isHigh
self.direction = direction # 1 for right, -1 for left
self.direction = direction
self.speed = 0.15
self.isActive = True
self.damage = playerMaxHealth // 2 # Half of player's max health
@@ -61,7 +61,6 @@ class Catapult(Object):
isCollectible=False,
)
self.sounds = sounds
self.direction = direction
self.fireInterval = fireInterval # Time between shots in milliseconds
self.firingRange = firingRange # How close player needs to be to trigger firing
self.lastFireTime = 0

View File

@@ -59,7 +59,6 @@ class Level:
xPos[0],
obj["y"],
self.sounds,
direction=obj.get("direction", 1),
fireInterval=obj.get("fireInterval", 5000),
firingRange=obj.get("range", 20)
)