generated from dvorakmortonxd/pygame-template
slight bug fix
This commit is contained in:
parent
2925a24a46
commit
f863ae1c2f
1 changed files with 4 additions and 1 deletions
5
main.py
5
main.py
|
|
@ -36,9 +36,12 @@ def main(fps=window_fps): # the main function
|
||||||
lastclickpos = pygame.mouse.get_pos() # sets the variable to the position you last clicked
|
lastclickpos = pygame.mouse.get_pos() # sets the variable to the position you last clicked
|
||||||
if event.type == pygame.MOUSEBUTTONUP: # what happens when you release a mouse button
|
if event.type == pygame.MOUSEBUTTONUP: # what happens when you release a mouse button
|
||||||
click = False # sets the click variable to False so level function in levels.py can see again
|
click = False # sets the click variable to False so level function in levels.py can see again
|
||||||
|
if level == 0:
|
||||||
|
running = False
|
||||||
if level == 1: # what happens when the level variable is equal to 1
|
if level == 1: # what happens when the level variable is equal to 1
|
||||||
level = levels.level1(screen, sheet, screen_width, screen_height, lastclickpos, basicfont, pygame.mouse, click, bigfont, level, tick, slightly_smaller_than_bigfont) # runs the level1 function from levels.py
|
level = levels.level1(screen, sheet, screen_width, screen_height, lastclickpos, basicfont, pygame.mouse, click, bigfont, level, tick, slightly_smaller_than_bigfont) # runs the level1 function from levels.py
|
||||||
|
if level == 2:
|
||||||
|
pass
|
||||||
# THE REASON WE CALL IT LIKE THIS INSTEAD OF NORMALLY IS SO WE CAN CHANGE THE LEVEL VARIABLE
|
# THE REASON WE CALL IT LIKE THIS INSTEAD OF NORMALLY IS SO WE CAN CHANGE THE LEVEL VARIABLE
|
||||||
|
|
||||||
elif level == 2: # what happens when the level variable is equal to 2 ofc
|
elif level == 2: # what happens when the level variable is equal to 2 ofc
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue