Add main
commit
bcfae905d9
|
@ -0,0 +1,29 @@
|
||||||
|
import pygame
|
||||||
|
from gun import Gun
|
||||||
|
import controls
|
||||||
|
from pygame.sprite import Group
|
||||||
|
from stats import Stats
|
||||||
|
from scores import Scores
|
||||||
|
|
||||||
|
def run():
|
||||||
|
pygame.init()
|
||||||
|
screen=pygame.display.set_mode((500, 500))
|
||||||
|
pygame.display.set_caption("flower")
|
||||||
|
gun=Gun(screen)
|
||||||
|
bullets=Group()
|
||||||
|
enemies=Group()
|
||||||
|
stats = Stats()
|
||||||
|
scores = Scores(screen, stats)
|
||||||
|
bg_color = (250,250,0)
|
||||||
|
controls.create_army(screen, enemies)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
controls.events(gun, screen, bullets)
|
||||||
|
gun.update_gun()
|
||||||
|
controls.update_bullets(bullets, enemies, screen, stats, scores)
|
||||||
|
controls.update(bg_color, screen, gun, enemies, bullets, stats, scores)
|
||||||
|
|
||||||
|
controls.update_enemies(stats,screen, gun, enemies, bullets, scores)
|
||||||
|
|
||||||
|
|
||||||
|
run()
|
Loading…
Reference in New Issue