summaryrefslogtreecommitdiff
path: root/shot.py
diff options
context:
space:
mode:
authoryuzu-eva <stevenhu@web.de>2024-09-20 18:25:40 +0200
committeryuzu-eva <stevenhu@web.de>2024-09-20 18:25:40 +0200
commita00f4cf1eb4217483408dde11d9d0c7e763ab0a2 (patch)
treed765011d7ef9ac82936493aadac40d67b351e148 /shot.py
parent220e57f42fca7bd241041e5c808f62a3fa7cfa2a (diff)
added ability to shoot
Diffstat (limited to 'shot.py')
-rw-r--r--shot.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/shot.py b/shot.py
new file mode 100644
index 0000000..198b48e
--- /dev/null
+++ b/shot.py
@@ -0,0 +1,13 @@
+from constants import *
+from circleshape import *
+
+class Shot(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)
+
+ def update(self, dt):
+ self.position += self.velocity * dt
+