Adding in bullets
This commit is contained in:
3
main.py
3
main.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user