Adding in bullets

This commit is contained in:
franky212
2024-10-28 21:10:08 -06:00
parent ae27a3c7a0
commit 48acf7759a
4 changed files with 32 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ from constants import SCREEN_HEIGHT, SCREEN_WIDTH
from player import Player
from asteroid import Asteroid
from asteroidfield import AsteroidField
from shot import Shot
def main():
pygame.init()
@@ -16,9 +17,11 @@ def main():
asteroids = pygame.sprite.Group()
updatable = pygame.sprite.Group()
drawable = pygame.sprite.Group()
shots = pygame.sprite.Group()
Asteroid.containers = (asteroids, updatable, drawable)
AsteroidField.containers = updatable
Shot.containers = (shots, updatable, drawable)
asteroid_field = AsteroidField()
Player.containers = (updatable, drawable)