14 lines
363 B
Python
14 lines
363 B
Python
import pygame as pg
|
|
from abc import abstractmethod
|
|
|
|
|
|
class Effect(pg.sprite.Sprite):
|
|
def __init__(
|
|
self, image: pg.Surface, rect: pg.Rect, *groups: pg.sprite.Group
|
|
) -> None:
|
|
super().__init__(*groups)
|
|
self.rect = rect
|
|
self.image = image
|
|
|
|
def draw(self, surface: pg.Surface):
|
|
surface.blit(self.image, self.rect)
|