Files
bootdev_asteroids/asteroid.py

14 lines
356 B
Python
Raw Normal View History

2025-07-12 20:04:42 +02:00
from circleshape import CircleShape
import pygame
class Asteroid(CircleShape):
def __init__(self, x, y, radius):
super().__init__(x,y, radius)
def draw(self, screen):
pygame.draw.circle(screen, (255,255,255), (self.position.x, self.position.y), self.radius)
def update(self, dt):
self.position += self.velocity * dt