-
Notifications
You must be signed in to change notification settings - Fork 7
/
cfg.py
35 lines (33 loc) · 1.2 KB
/
cfg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'''配置文件'''
import os
'''屏幕大小'''
SCREENSIZE = (600, 150)
'''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)