14 lines
356 B
Python
14 lines
356 B
Python
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
|