def switch_level(level_obj): global level level = level_obj if level != 0: CONST.parse_const(CONST.path_prefix+"data/json/init.json") level.init()
def switch_level(level_obj): global level if level is not None: level.exit() level = level_obj if level is not None: CONST.parse_const(CONST.path_prefix+"data/json/init.json") level.init()