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:
@@ -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
|
||||
|
@@ -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)
|
||||
)
|
||||
|
Reference in New Issue
Block a user