asteroids/circleshape.py

23 lines
538 B
Python
Raw Permalink Normal View History

2024-10-08 17:00:59 +00:00
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