fied a bug were the game would crash during door creation
Signed-off-by: SpagettiFisch <63868515+SpagettiFisch@users.noreply.github.com>
This commit is contained in:
parent
7709fd52f7
commit
3883237f91
2 changed files with 11 additions and 10 deletions
|
|
@ -293,6 +293,7 @@ class Room(GameObjects):
|
|||
return walls
|
||||
|
||||
def createDoors(self, WIDTH):
|
||||
if not self.type == 'boss':
|
||||
if len(self.exits) == 1:
|
||||
self.doors.append(Door(f'door{self.id}', self.exits[0][1], random.randint(64, round(WIDTH * 0.75)), 4, self.exits[0][0]))
|
||||
elif len(self.exits) == 2:
|
||||
|
|
|
|||
2
main.py
2
main.py
|
|
@ -290,7 +290,7 @@ def options(screen, clock, running, background, isblack, WIDTH, HEIGHT):
|
|||
|
||||
def menu(screen, clock, running, background, isblack, WIDTH, HEIGHT):
|
||||
objects = []
|
||||
objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2, 160, 64, 'textbox.png', 'medieval', 48, "Play", play, attributes=[screen, clock, running, background, isblack, WIDTH, HEIGHT]))
|
||||
objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2, 160, 64, 'textbox.png', 'medieval', 48, "Play", village, attributes=[screen, clock, running, background, isblack, WIDTH, HEIGHT]))
|
||||
#objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2 - 72, 160, 64, 'textbox.png', 'medieval', 48, "Options", uwu))
|
||||
objects.append(Button(WIDTH / 2 - 80, HEIGHT / 2 + 72, 160, 64, 'textbox.png', 'medieval', 48, "Exit game", quitGame))
|
||||
while running:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue