22 lines
538 B
Python
22 lines
538 B
Python
import pygame
|
|
|
|
|
|
class CircleShape(pygame.sprite.Sprite):
|
|
def __init__(self, x, y, radius):
|
|
# we will be using this later
|
|
if hasattr(self, "containers"):
|
|
super().__init__(self.containers)
|
|
else:
|
|
super().__init__()
|
|
|
|
self.position = pygame.Vector2(x, y)
|
|
self.velocity = pygame.Vector2(0, 0)
|
|
self.radius = radius
|
|
|
|
def draw(self, screen):
|
|
# sub-classes must override
|
|
pass
|
|
|
|
def update(self, dt):
|
|
# sub-classes must override
|
|
pass
|