Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- class Panel(pygame.sprite.Sprite):
- def __init__(self, x, y, filename):
- super().__init__()
- self.image = pygame.image.load(filename)
- self.rect = self.image.get_rect(topleft=(x, y))
- def update(self, screen, x, y):
- self.rect = self.image.get_rect(topleft=(x, y))
- screen.blit(self.image, self.rect)
Advertisement
Add Comment
Please, Sign In to add comment