-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresources.py
More file actions
25 lines (19 loc) · 759 Bytes
/
resources.py
File metadata and controls
25 lines (19 loc) · 759 Bytes
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
import pyglet
from constants import *
pyglet.resource.path = ['./resources']
pyglet.resource.reindex()
bg_img = pyglet.resource.image("background.png")
boat_right_img = pyglet.resource.image("boat-right.png")
tree_img = pyglet.resource.image("tree.png")
rock_img = pyglet.resource.image("rock.png")
sky_img = pyglet.resource.image("sky.png")
sounds = {
MUSIC: pyglet.resource.media("song.mp3"),
PADDLE: pyglet.resource.media("paddle.wav", streaming=False),
HIT: pyglet.resource.media("hit.wav", streaming=False),
BACKGROUND: pyglet.resource.media("birds.mp3")
}
t2_img = pyglet.resource.image("tree2.png")
t3_img = pyglet.resource.image("tree3.png")
r2_img = pyglet.resource.image("rock2.png")
r3_img = pyglet.resource.image("rock3.png")