the-larvae/levels.py

11 lines
No EOL
1,002 B
Python

from render import load_sprite # this makes it so our function for rendering sprites from sprites.png is available in here
def level1(screen, sheet, lastclickpos, basicfont, mouse, click, level): # the function for our first level, ignore the unused variables here, you can use them when you edit it
screen.blit(load_sprite(sheet, 0, 0, 57, 36, 912, 576), (0, 0)) # this renders a button I made in the sprites.png, its purely for visual purposes so it doesnt matter where you click rn
if click: # this checks if you clicked, when you clicked it does the following stuff under
level = 2 # sets the level to 2
print("yo") # prints out "yo" for debugging purposes, otherwise completely unnecessary
return level # this returns the change we made to the level so that it updates in main.py
def level2(screen, sheet, lastclickpos, basicfont, mouse, click, level): # function for level 2
print("ur done") # prints out "ur done"
return level # returns the current level set