Esempio n. 1
0
def input_load_save(save_id: str):
    """
    载入存档存档id对应数据,覆盖当前游戏内存
    Keyword arguments:
    save_id -- 存档id
    """
    cache.__dict__ = load_save(save_id).__dict__
    character_handle.init_character_position()
Esempio n. 2
0
def init_game_start():
    """
    用于结束角色创建正式开始游戏的初始化流程
    """
    character_handle.init_character_dormitory()
    character_handle.init_character_position()
    course.init_phase_course_hour()
    interest.init_character_interest()
    course.init_character_knowledge()
    course.init_class_teacher()
    course.init_class_time_table()
    character_position = cache_contorl.character_data["character"][0].position
    map_handle.character_move_scene(["0"], character_position, 0)
    cache_contorl.now_flow_id = "main"
def game_start():
    """ 初始化游戏数据 """
    character_handle.init_character_dormitory()
    character_handle.init_character_position()
    course.init_phase_course_hour()
    interest.init_character_interest()
    course.init_character_knowledge()
    course.init_class_teacher()
    course.init_class_time_table()
    course.init_teacher_table()
    cooking.init_recipes()
    cooking.init_restaurant_data()
    character_position = cache.character_data[0].position
    map_handle.character_move_scene(["0"], character_position, 0)
    cache.school_longitude = random.uniform(120.9, 122.12)
    cache.school_latitude = random.uniform(30.7, 31.53)
Esempio n. 4
0
def input_load_save(save_id: str):
    """
    载入存档存档id对应数据,覆盖当前游戏内存
    Keyword arguments:
    save_id -- 存档id
    """
    save_data = load_save(save_id)
    cache_contorl.character_data = save_data["1"]
    cache_contorl.game_time = save_data["2"]
    cache_contorl.scene_data = save_data["3"]
    cache_contorl.map_data = save_data["4"]
    cache_contorl.npc_tem_data = save_data["5"]
    cache_contorl.random_npc_list = save_data["6"]
    cache_contorl.total_bodyfat_by_age = save_data["7"]
    cache_contorl.average_bodyfat_by_age = save_data["8"]
    cache_contorl.total_number_of_people_of_all_ages = save_data["9"]
    cache_contorl.total_height_by_age = save_data["10"]
    cache_contorl.average_height_by_age = save_data["11"]
    cache_contorl.recipe_data = save_data["12"]
    character_handle.init_character_position()