Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Instructions():
- # declare only once
- paragraph = """Your are the last surviving rhino. Your horn
- is worth millions! Right now you are trapped in a zoo and
- waiting to be slaughtered for your horn. But you can't give
- up! Escape from the tribesmen and zoo security so you can
- enjoy your life as a free being once again"""
- # load only once
- image = pygame.image.load("background0.jpg").convert()
- # create only once
- InstructionFont = pygame.font.SysFont("elephant",15)
- # get only once
- TextSurf, TextRect = text_objects(paragraph, InstructionFont)
- # set only once
- #TextRect.center = ((screen_width/2),(screen_height/2))
- TextRect.center = screen.center
- # create button only once
- button = Buttons("BACK",100,500,120,50,TURQUOISE,DARK_TURQUOISE,"back")
- # blit only once
- screen.blit(image, (0,0))
- # blit only once
- screen.blit(TextSurf, TextRect)
- # draw only once
- button.draw()
- # update only once
- pygame.display.update()
- intro = True
- # repeat thousands times in one second.
- while intro:
- # check events 15 times per second (15 FPS)
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- pygame.quit()
- quit()
- clock.tick(15) # <- slow down to 15 FPS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement