-
Notifications
You must be signed in to change notification settings - Fork 0
/
textures.py
25 lines (20 loc) · 877 Bytes
/
textures.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
import pygame
from constants import BLOCK_SIZE
def load_textures():
# Load wall texture
wall_texture = pygame.image.load("wall_texture.png").convert()
wall_texture = pygame.transform.scale(wall_texture, (BLOCK_SIZE, BLOCK_SIZE))
# Create dot texture
#dot_texture = pygame.Surface((BLOCK_SIZE, BLOCK_SIZE))
#dot_texture.fill(pygame.Color("green"))
dot_texture = pygame.image.load("pizza.png").convert()
dot_texture=pygame.transform.scale(dot_texture, (BLOCK_SIZE, BLOCK_SIZE))
# Load Pac-Man texture
pacman_texture = pygame.image.load("pacman.png").convert()
pacman_texture = pygame.transform.scale(pacman_texture, (BLOCK_SIZE, BLOCK_SIZE))
# Return a dictionary containing the textures
return {
"wall_texture": wall_texture,
"dot_texture": dot_texture,
"pacman_texture": pacman_texture
}