-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtexturer.py
49 lines (41 loc) · 2.35 KB
/
texturer.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
import pygame
# Set the object that houses the textures for the game
class Texturer:
def __init__(self, filename):
self.base_image_run = pygame.image.load('Assets/base_game/Dino/DinoRun1.png')
self.image_size_run = self.base_image_run.get_size()
self.base_image_jump = pygame.image.load('Assets/base_game/Dino/DinoJump.png')
self.image_size_jump = self.base_image_jump.get_size()
self.base_image_duck = pygame.image.load('Assets/base_game/Dino/DinoDuck1.png')
self.image_size_duck = self.base_image_duck.get_size()
self.RUNNING = [
pygame.transform.scale(pygame.image.load('Assets/{}/Dino/DinoRun1.png'.format(filename)),
self.image_size_run),
pygame.transform.scale(pygame.image.load('Assets/{}/Dino/DinoRun2.png'.format(filename)),
self.image_size_run)
]
self.DUCKING = [
pygame.transform.scale(pygame.image.load('Assets/{}/Dino/DinoDuck1.png'.format(filename)),
self.image_size_duck),
pygame.transform.scale(pygame.image.load('Assets/{}/Dino/DinoDuck2.png'.format(filename)),
self.image_size_duck)
]
self.JUMPING = pygame.transform.scale(pygame.image.load('Assets/{}/Dino/DinoJump.png'.format(filename)),
self.image_size_jump)
self.SMALL_CACTI = [
pygame.image.load('Assets/base_game/Cactus/SmallCactus1.png'),
pygame.image.load('Assets/base_game/Cactus/SmallCactus2.png'),
pygame.image.load('Assets/base_game/Cactus/SmallCactus3.png')
]
self.LARGE_CACTI = [
pygame.image.load('Assets/base_game/Cactus/LargeCactus1.png'),
pygame.image.load('Assets/base_game/Cactus/LargeCactus2.png'),
pygame.image.load('Assets/base_game/Cactus/LargeCactus3.png')
]
self.BIRD = [
pygame.image.load('Assets/base_game/Bird/Bird1.png'),
pygame.image.load('Assets/base_game/Bird/Bird2.png')
]
self.CLOUD = pygame.image.load('Assets/base_game/Other/Cloud.png')
self.BG = pygame.image.load('Assets/base_game/Other/Track.png')
self.POWERUP = [pygame.transform.scale(pygame.image.load('Assets/images/powerup.png'), (60, 60))]