Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import pygame
  2. import time
  3. import random
  4.  
  5. pygame.init()
  6. (width, height) = (1366, 768)
  7.  
  8. black = (0, 0, 0)
  9. white = (225, 225, 225)
  10. red = (225, 0, 0)
  11.  
  12. background_color = white
  13.  
  14. screen = pygame.display.set_mode((width, height))
  15. pygame.display.set_caption('Battle of the Forgotten Friend')
  16. screen.fill(background_color)
  17. clock = pygame.time.Clock()
  18. titlescreen = pygame.image.load('titlescreen.png')
  19.  
  20.  
  21. def text_objects(text, font):
  22. textSurface = font.render(text, True, black)
  23. return textSurface, textSurface.get_rect()
  24.  
  25.  
  26. def game_intro():
  27. intro = True
  28. while intro:
  29. for event in pygame.event.get():
  30. print(event)
  31. if event.type == pygame.QUIT:
  32. pygame.quit()
  33. quit()
  34. pygame.image.load(titlescreen)
  35. screen.blit(titlescreen, (0, 0))
  36. pygame.display.flip()
  37. clock.tick(15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement