-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspinning.py
More file actions
50 lines (35 loc) · 1012 Bytes
/
Copy pathspinning.py
File metadata and controls
50 lines (35 loc) · 1012 Bytes
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
50
import sys
import pygame
from pygame.locals import *
pygame.init()
size = width, height = 720, 480
speed = [2, 2]
black = (0,0,0)
blue = (0,0,255)
green = (0,255,0)
red = (255,0,0)
screen = pygame.display.set_mode(size)
pygame.display.set_caption("BETA::00.0.1")
clock = pygame.time.Clock()
def text_objects(text, font):
textSurface = font.render(text, True, black)
return textSurface, textSurface.get_rect()
def game_intro():
screen.fill(blue)
largeText = pygame.font.Font('freesansbold.ttf',115)
TextSurf, TextRect = text_objects("BETA", largeText)
TextRect.center = ((width/2),(height/2))
screen.blit(TextSurf, TextRect)
pygame.draw.rect(screen, green,(150,450,100,50))
pygame.draw.rect(screen, red,(550,450,100,50))
pygame.display.flip()
pygame.display.update()
clock.tick(15)
intro = True
while intro:
for event in pygame.event.get():
print(event)
if event.type == pygame.QUIT:
pygame.quit()
quit()
game_intro()