10 lines
261 B
Python
10 lines
261 B
Python
# library imports
|
|
import pygame
|
|
|
|
class Sprite(pygame.sprite.Sprite):
|
|
|
|
def __init__(self,pos,surf,groups):
|
|
super().__init__(groups)
|
|
self.image = surf
|
|
self.rect = self.image.get_rect(topleft = pos)
|
|
self.hitbox = self.rect.inflate(0,-self.rect.height / 3) |