-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.py
49 lines (40 loc) · 1.43 KB
/
const.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
import os
import pygame
pygame.font.init()
FONTS = pygame.font.get_fonts()
FONT = "consolas" if "consolas" in FONTS else "arial"
WIDTH, HEIGHT = 750, 750
FPS = 60
MAIN_FONT = pygame.font.SysFont(FONT, 40)
LOST_FONT = pygame.font.SysFont(FONT, 60, bold=True)
LASER_VEL = 5
PLAYER_VEL = 5
ENEMY_VEL = 0.5
ENEMY_SCORE = 10
BOSS_SCORE = 100
# Load images
boi1 = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "boi1.png")), (128, 128))
boi2 = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "boi2.png")), (128, 128))
boi3 = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "boi3.png")), (128, 128))
# Player player
player_ship = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "player.png")), (128, 128))
# Lasers
red = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "red.png")), (128, 128))
purple = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "porpol.png")), (128, 128))
blue = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "blue.png")), (128, 128))
orange = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "orange.png")), (128, 128))
#space crab
boss_img = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "SPACECRAB.png")), (256, 256))
# Background
BG = pygame.transform.scale(
pygame.image.load(os.path.join("assets", "background.jpg")),
(WIDTH, HEIGHT))