-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
136 lines (118 loc) · 4.86 KB
/
constants.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import pyglet
# Load and scale all assets
# Sounds
popsound = pyglet.media.load("assets/pop.wav", streaming=False)
hoversound = pyglet.media.load("assets/hover.wav", streaming=False)
clicksound = pyglet.media.load("assets/click.wav", streaming=False)
yaysound = pyglet.media.load("assets/yay.wav", streaming=False)
startmusic = pyglet.media.load("assets/startmusic.wav", streaming=False)
gamemusic = pyglet.media.load("assets/gamemusic.wav", streaming=False)
playerSounds = [pyglet.media.load("assets/soundred.wav", streaming=False),
pyglet.media.load("assets/soundorange.wav", streaming=False),
pyglet.media.load("assets/soundyellow.wav", streaming=False),
pyglet.media.load("assets/soundgreen.wav", streaming=False),
pyglet.media.load("assets/soundblue.wav", streaming=False),
pyglet.media.load("assets/soundpurple.wav", streaming=False)]
# Images
scale = 0.35
bg = pyglet.image.load('assets/background.png')
bg.texture.width *= scale
bg.texture.height *= scale
scale = 0.50
title = pyglet.image.load('assets/title.png')
title.texture.width = title.texture.width * scale
title.texture.height = title.texture.height * scale
scale = 0.45
devnames = pyglet.image.load('assets/devnames.png')
devnames.texture.width *= scale
devnames.texture.height *= scale
scale = 0.35
selectgamesize = pyglet.image.load('assets/selectgamesize.png')
selectgamesize.texture.width *= scale
selectgamesize.texture.height *= scale
scale = 0.35
chooseplayer = pyglet.image.load('assets/chooseplayer.png')
chooseplayer.texture.width *= scale
chooseplayer.texture.height *= scale
scale = 0.35
winrecord = pyglet.image.load('assets/winrecord.png')
winrecord.texture.width *= scale
winrecord.texture.height *= scale
scale = 0.3
startbutton = pyglet.image.load('assets/startbutton.png')
startbutton.texture.width = startbutton.texture.width * scale
startbutton.texture.height = startbutton.texture.height * scale
scale = 0.3
exitbutton = pyglet.image.load('assets/exitbutton.png')
exitbutton.texture.width = exitbutton.texture.width * scale
exitbutton.texture.height = exitbutton.texture.height * scale
scale = 0.22
quitbutton = pyglet.image.load('assets/quitbutton.png')
quitbutton.texture.width = quitbutton.texture.width * scale
quitbutton.texture.height = quitbutton.texture.height * scale
scale = 0.22
menu = pyglet.image.load('assets/menu.png')
menu.texture.width *= scale
menu.texture.height *= scale
scale = 0.35
pluswin = pyglet.image.load('assets/pluswin.png')
pluswin.texture.width *= scale
pluswin.texture.height *= scale
gameover = pyglet.image.load('assets/gameover.png')
numOptionPics = [pyglet.image.load('assets/2p.png'), pyglet.image.load('assets/3p.png'),
pyglet.image.load('assets/4p.png'), pyglet.image.load('assets/5p.png'),
pyglet.image.load('assets/6p.png')]
scale = 0.22
for pic in numOptionPics:
pic.texture.width = pic.width * scale
pic.texture.height = pic.height * scale
playerPics = [pyglet.image.load('assets/playerred.png'), pyglet.image.load('assets/playerorange.png'),
pyglet.image.load('assets/playeryellow.png'), pyglet.image.load('assets/playergreen.png'),
pyglet.image.load('assets/playerblue.png'), pyglet.image.load('assets/playerpurple.png')]
scale = 0.33
for pic in playerPics:
pic.texture.width = pic.width * scale
pic.texture.height = pic.height * scale
colorPics = {
"red": pyglet.image.load('assets/red.png'),
"orange": pyglet.image.load('assets/orange.png'),
"yellow": pyglet.image.load('assets/yellow.png'),
"green": pyglet.image.load('assets/green.png'),
"blue": pyglet.image.load('assets/blue.png'),
"purple": pyglet.image.load('assets/purple.png')
}
# define needed colors with RGB values
rgbColors = {
"red": (234, 24, 19, 255,
234, 24, 19, 255,
234, 24, 19, 255,
234, 24, 19, 255),
"orange": (244, 110, 0, 255,
244, 110, 0, 255,
244, 110, 0, 255,
244, 110, 0, 255),
"yellow": (255, 215, 10, 255,
255, 215, 10, 255,
255, 215, 10, 255,
255, 215, 10, 255),
"green": (19, 204, 79, 255,
19, 204, 79, 255,
19, 204, 79, 255,
19, 204, 79, 255),
"blue": (19, 57, 204, 255,
19, 57, 204, 255,
19, 57, 204, 255,
19, 57, 204, 255),
"purple": (184, 15, 208, 255,
184, 15, 208, 255,
184, 15, 208, 255,
184, 15, 208, 255),
"white": (255, 255, 255, 0,
255, 255, 255, 0,
255, 255, 255, 0,
255, 255, 255, 0),
"black": (0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0)
}