项目配置
get_project_config()
Section titled “get_project_config()”返回工程的完整设置字典。找不到或无法读取 project.pygs 时抛出 RuntimeError——只有在文件被手动移动或改写时才会发生。文件位于工程根目录;在受保护的打包版本中会被加密,读取时自动解密,用法完全一致。
get_project_path()
Section titled “get_project_path()”当前工程根目录的路径;不在工程中运行时返回 ''。
资源面板设置(current_scene、sort_type)。类型 dict。
asset.current_scene
Section titled “asset.current_scene”调用 studio.load_scene() 且未指定路径时加载的场景。类型 str。
asset.sort_type
Section titled “asset.sort_type”资源面板的排序方式——仅编辑器使用。类型 int。
打包窗口中的选项:app_name、app_icon、output_dir。类型 dict。
caption
Section titled “caption”工程名称。它是游戏窗口的初始标题,也是打包时默认的应用名称。类型 str。
screen_size
Section titled “screen_size”[screen_width, screen_height],即传给 pygame.display.set_mode() 的尺寸。类型 list。
screen_width、screen_height
Section titled “screen_width、screen_height”窗口宽度、高度(像素)。类型 int。