Adding asteroids/fields and collision

This commit is contained in:
franky212
2024-10-28 17:31:31 -06:00
parent 0412b21bb0
commit ae27a3c7a0
4 changed files with 85 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
import pygame
from circleshape import CircleShape
class Asteroid(CircleShape):
def __init__(self, x, y, radius):
super().__init__(x, y, radius)
def draw(self, screen):
pygame.draw.circle(screen, "white", self.position, self.radius, 2)
def update(self, dt):
self.position += (self.velocity * dt)