ClearCode

SimpleZelda debug

Jan 18th, 2022
9,192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import pygame
  2. pygame.init()
  3. font = pygame.font.Font(None,30)
  4.  
  5. def debug(info,y = 10, x = 10):
  6.     display_surface = pygame.display.get_surface()
  7.     debug_surf = font.render(str(info),True,'White')
  8.     debug_rect = debug_surf.get_rect(topleft = (x,y))
  9.     pygame.draw.rect(display_surface,'Black',debug_rect)
  10.     display_surface.blit(debug_surf,debug_rect)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment