path update
This commit is contained in:
parent
2e2576fdb3
commit
7070baeb60
11
sprites.py
11
sprites.py
@ -11,22 +11,17 @@ from pygame.locals import *
|
|||||||
screen=pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
|
screen=pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
|
||||||
|
|
||||||
def load_img(name):
|
def load_img(name):
|
||||||
img_path=os.path.join('data\graphics', name)
|
img_path=os.path.join('data','graphics', name)
|
||||||
image=pygame.image.load(img_path).convert()
|
image=pygame.image.load(img_path).convert()
|
||||||
colorkey=image.get_at((0,0))
|
colorkey=image.get_at((0,0))
|
||||||
image.set_colorkey(colorkey, RLEACCEL)
|
image.set_colorkey(colorkey, RLEACCEL)
|
||||||
return image, image.get_rect()
|
return image, image.get_rect()
|
||||||
|
|
||||||
def load_img_noalpha(name):
|
def load_img_noalpha(name):
|
||||||
img_path=os.path.join('data\graphics', name)
|
img_path=os.path.join('data','graphics', name)
|
||||||
image=pygame.image.load(img_path).convert()
|
image=pygame.image.load(img_path).convert()
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def load_sound(name):
|
|
||||||
sound_path=os.path.join('data\sounds')
|
|
||||||
sound=pygame.mixer.Sound(sound_path)
|
|
||||||
return sound
|
|
||||||
|
|
||||||
# sprite groups
|
# sprite groups
|
||||||
|
|
||||||
all_sprites=pygame.sprite.Group()
|
all_sprites=pygame.sprite.Group()
|
||||||
|
Loading…
Reference in New Issue
Block a user