asteroids render
This commit is contained in:
13
asteroid.py
Normal file
13
asteroid.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user