-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstartTrainingScreen.py
34 lines (29 loc) · 1.06 KB
/
startTrainingScreen.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
import pygame
import os
from bottomClass import Bottom
from pipeClass import Pipe
from birdClass import Bird
windowWidth = 600
windowHeight = 800
window = pygame.display.set_mode((windowWidth, windowHeight))
floorDimension = 730
backgroundPhoto = pygame.transform.scale2x(pygame.image.load(os.path.join("images", "bg.png")))
pygame.font.init()
sf = pygame.font.SysFont("comicsans", 50)
ef = pygame.font.SysFont("comicsans", 50)
class Train:
def startTraining():
win = window
bird = Bird(250, 150)
base = Bottom(floorDimension)
pipes = [Pipe(700)]
window.blit(backgroundPhoto, (0,0))
for pipe in pipes:
pipe.draw(window)
base.draw(win)
bird.draw(win)
scoreLabel = ef.render("Press any key",1,(255,255,255))
window.blit(scoreLabel, (windowWidth - scoreLabel.get_width() - 160, 220))
scoreLabel = ef.render("to start training ",1,(255,255,255))
window.blit(scoreLabel, (windowWidth - scoreLabel.get_width() - 120, 300))
pygame.display.update()