from pygame.locals import * import math import pygame as pg import random import sys import time from effects.bouncingspot import BouncingSpot # pg.init() win = pg.display.set_mode(size=(1600, 1200), flags=pg.RESIZABLE) background = pg.Surface(win.get_size()) background.fill(pg.Color(0, 0, 0)) effects = [ BouncingSpot( bounds=win.get_rect(), colored=False, sizes=(300, 300), velocity=(1, 1), x_factor=(1, 1), y_factor=(2.2, 2.2), ), # BouncingSpot(bounds=win.get_rect()) ] FPS = pg.time.Clock() while True: for event in pg.event.get(): if event.type == QUIT: pg.quit() sys.exit() win.blit(background, (0, 0)) for e in effects: e.update() e.draw(win) pg.display.flip() FPS.tick(60) # print(FPS.get_fps())