SHARE
TWEET

Untitled

a guest Jul 21st, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top