From 127bd473109defbbf01b5d6f7e6792831bf958b4 Mon Sep 17 00:00:00 2001 From: pjy6q9iuf <2080284165@qq.com> Date: Fri, 31 May 2024 16:20:02 +0800 Subject: [PATCH] ADD file via upload --- cfg.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 cfg.py diff --git a/cfg.py b/cfg.py new file mode 100644 index 0000000..aacc416 --- /dev/null +++ b/cfg.py @@ -0,0 +1,31 @@ +'''配置文件''' +import os + + +'''屏幕大小''' +SCREENSIZE = (1000, 500) +'''FPS''' +FPS = 60 +'''音频素材路径''' +AUDIO_PATHS = { + 'die': os.path.join(os.getcwd(), 'resources/audios/die.wav'), + 'jump': os.path.join(os.getcwd(), 'resources/audios/jump.wav'), + 'point': os.path.join(os.getcwd(), 'resources/audios/point.wav') +} +'''图片素材路径''' +IMAGE_PATHS = { + 'cacti': [os.path.join(os.getcwd(), 'resources/images/cacti-big.png'), + os.path.join(os.getcwd(), 'resources/images/cacti-small.png')], + 'cloud': os.path.join(os.getcwd(), 'resources/images/cloud.png'), + 'dino': [os.path.join(os.getcwd(), 'resources/images/dino.png'), + os.path.join(os.getcwd(), 'resources/images/dino_ducking.png')], + 'gameover': os.path.join(os.getcwd(), 'resources/images/gameover.png'), + 'ground': os.path.join(os.getcwd(), 'resources/images/ground.png'), + 'numbers': os.path.join(os.getcwd(), 'resources/images/numbers.png'), + 'ptera': os.path.join(os.getcwd(), 'resources/images/ptera.png'), + 'replay': os.path.join(os.getcwd(), 'resources/images/replay.png') +} +'''背景颜色''' +BACKGROUND_COLOR = (235, 235, 235) +BLACK = (0, 0, 0) +WHITE = (255, 255, 255) \ No newline at end of file