summaryrefslogtreecommitdiff
path: root/asteroid.py
diff options
context:
space:
mode:
authoryuzu-eva <stevenhu@web.de>2024-09-20 17:55:28 +0200
committeryuzu-eva <stevenhu@web.de>2024-09-20 17:55:28 +0200
commit220e57f42fca7bd241041e5c808f62a3fa7cfa2a (patch)
tree1234322a927b2572ed2cf86500255a5cb35e0e02 /asteroid.py
parent681826fc3272b9ec0e60c6863381404c7ee42094 (diff)
add asteroids
Diffstat (limited to 'asteroid.py')
-rw-r--r--asteroid.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/asteroid.py b/asteroid.py
new file mode 100644
index 0000000..c77618c
--- /dev/null
+++ b/asteroid.py
@@ -0,0 +1,11 @@
+from circleshape import *
+
+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, 2)
+
+ def update(self, dt):
+ self.position += self.velocity * dt