mirror of
https://github.com/Nighthawk42/PyYoda.git
synced 2026-08-30 23:02:26 +00:00
12 lines
415 B
Python
12 lines
415 B
Python
# debug.py - This is a simple debug module for the game.
|
|
|
|
import pygame
|
|
pygame
|
|
font = pygame.font.Font(None, 30)
|
|
|
|
def debug(info, y = 10, x = 10):
|
|
display_surface = pygame.display.get_surface()
|
|
debug_surf = font.render(str(info), True, 'White')
|
|
debug_rect = debug_surf.get_rect(topleft = (x, y))
|
|
pygame.draw.rect(display_surface, 'Black', debug_rect)
|
|
display_surface.blit(debug_surf, debug_rect) |