Сделал жизни игроку и врагам

This commit is contained in:
2026-05-25 17:08:56 +03:00
parent 3029eaf485
commit e02e2ad194
2 changed files with 37 additions and 4 deletions
+6 -1
View File
@@ -12,7 +12,12 @@ class Bullet(arcade.Sprite):
self.center_y = y + math.cos(self.angle * math.pi / 180) * shift
self.speed = 10
Bullet.ls.append(self)
def destroy(self):
Bullet.ls.remove(self)
@classmethod
def get_colls(cls,sprite):
return arcade.check_for_collision_with_list(sprite, cls.ls)
@classmethod
def update_list(cls):
for bullet in cls.ls: