def new_level(): """ Create a new level Clear player pathlist Select another random music """ global LEVEL LEVEL = cLevel.cLevel() PLAYER.clear_pathlist() SOUNDS.play_music_random()
def load_level(level_num): status.level = cLevel(level_list.levelfiles[level_num]) stick.__init__(status.level.startx,status.level.starty,0,status.level.stick); #stick.load_stick_image(status.level.stick) status.reset_lives() status.set_game_status(cStatus._STAT_GAMING) status.SUBSTAT = 0 status.current_level = level_num status.reset_timer() status.clear_penalty_seconds()
def load_level_filename(level_fname): """Load level from a filename. For debug purposes""" status.level = cLevel(level_fname) stick.__init__(status.level.startx,status.level.starty,0,status.level.stick); #stick.load_stick_image(status.level.stick) status.reset_lives() status.set_game_status(cStatus._STAT_GAMING) status.SUBSTAT = 0 status.current_level = -1 status.reset_timer() status.clear_penalty_seconds()
from strings import * from attributions import * from mazeconfig import * pygame.init() size = width, height = 800,600 FPS = 60 clock = pygame.time.Clock () window = pygame.display.set_mode(size) pygame.display.set_caption("MAZE") iconimg = pygame.image.load(getdatapath()+"icon.png").convert_alpha() pygame.display.set_icon(iconimg) PLAYER = cPlayer.cPlayer(10,10,10,10) LEVEL = cLevel.cLevel() show_menu = True show_credits = False endgame = False fullscreen = False SOUNDS.play_music(9) MESSAGE = cMsg.cMsg("TEST",window) # # Menus # #Main Menu