42 lines
781 B
Python
42 lines
781 B
Python
import pygame
|
|
import sprites
|
|
|
|
|
|
pygame.init()
|
|
|
|
SCREEN_WIDTH = 1280
|
|
SCREEN_HEIGHT = 720
|
|
|
|
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
|
|
|
|
clock = pygame.time.Clock()
|
|
|
|
player = pygame.sprite.GroupSingle()
|
|
player.add(sprites.Player())
|
|
|
|
top_street_boarder = pygame.Rect(0, 50, SCREEN_WIDTH, 4)
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run = True
|
|
while run:
|
|
for event in pygame.event.get():
|
|
if event.type == pygame.QUIT:
|
|
run = False
|
|
|
|
|
|
screen.fill("Grey")
|
|
player.draw(screen)
|
|
player.update()
|
|
|
|
|
|
#pygame.draw.rect(screen, (0, 0, 0), line)
|
|
|
|
#if stickman_rect.colliderect(line):
|
|
# stickman_rect.y = 55
|
|
|
|
pygame.display.update()
|
|
clock.tick(60)
|
|
|
|
pygame.quit() |