summaryrefslogtreecommitdiff
path: root/circleshape.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 /circleshape.py
parent220e57f42fca7bd241041e5c808f62a3fa7cfa2a (diff)
added ability to shoot
Diffstat (limited to 'circleshape.py')
-rw-r--r--circleshape.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/circleshape.py b/circleshape.py
index eb08882..0093b29 100644
--- a/circleshape.py
+++ b/circleshape.py
@@ -20,3 +20,6 @@ class CircleShape(pygame.sprite.Sprite):
def update(self, dt):
# sub-classes must override
pass
+
+ def collision_check(self, other):
+ return self.position.distance_to(other.position) <= self.radius + other.radius