remove usless if
This commit is contained in:
parent
3e8352aae7
commit
51c3d571dc
77
main.py
77
main.py
@ -34,50 +34,49 @@ liste_sprites_ananas = pygame.sprite.LayeredUpdates()
|
|||||||
liste_des_sprites.add(avion)
|
liste_des_sprites.add(avion)
|
||||||
liste_d_ananas = []
|
liste_d_ananas = []
|
||||||
|
|
||||||
if running == True:
|
police = pygame.font.Font(None, 25)
|
||||||
police = pygame.font.Font(None, 25)
|
texte = pygame.sprite.Sprite()
|
||||||
texte = pygame.sprite.Sprite()
|
pygame.sprite.Sprite.__init__(texte)
|
||||||
pygame.sprite.Sprite.__init__(texte)
|
texte.image = police.render("ALERTE! La planète Terre est attaquée par une flotte d’avions spatiaux!", 1, (10, 10, 10),(255, 90, 20))
|
||||||
texte.image = police.render("ALERTE! La planète Terre est attaquée par une flotte d’avions spatiaux!", 1, (10, 10, 10),(255, 90, 20))
|
texte.rect = texte.image.get_rect()
|
||||||
texte.rect = texte.image.get_rect()
|
texte.rect.centerx = 360
|
||||||
texte.rect.centerx = 360
|
texte.rect.centery = 30
|
||||||
texte.rect.centery = 30
|
liste_des_sprites.add(texte)
|
||||||
liste_des_sprites.add(texte)
|
|
||||||
|
|
||||||
police = pygame.font.Font(None, 20)
|
police = pygame.font.Font(None, 20)
|
||||||
texte2 = pygame.sprite.Sprite()
|
texte2 = pygame.sprite.Sprite()
|
||||||
texte2.image = police.render("Vous vous trouver dans l’engin SU-PER12. Votre mission est d’éliminer le plus d’ennemis possible!", 1, (10, 10, 10),(255, 90, 20))
|
texte2.image = police.render("Vous vous trouver dans l’engin SU-PER12. Votre mission est d’éliminer le plus d’ennemis possible!", 1, (10, 10, 10),(255, 90, 20))
|
||||||
texte2.rect = texte2.image.get_rect()
|
texte2.rect = texte2.image.get_rect()
|
||||||
texte2.rect.centerx = 360
|
texte2.rect.centerx = 360
|
||||||
texte2.rect.centery = 60
|
texte2.rect.centery = 60
|
||||||
liste_des_sprites.add(texte2)
|
liste_des_sprites.add(texte2)
|
||||||
|
|
||||||
police = pygame.font.Font(None, 20)
|
police = pygame.font.Font(None, 20)
|
||||||
texte3 = pygame.sprite.Sprite()
|
texte3 = pygame.sprite.Sprite()
|
||||||
texte3.image = police.render("Pour ce faire, appuyez sur « espace » pour tirer et bougez la souris pour manoeuvrer votre SU-PER12!", 1, (10, 10, 10),(255, 90, 20))
|
texte3.image = police.render("Pour ce faire, appuyez sur « espace » pour tirer et bougez la souris pour manoeuvrer votre SU-PER12!", 1, (10, 10, 10),(255, 90, 20))
|
||||||
texte3.rect = texte3.image.get_rect()
|
texte3.rect = texte3.image.get_rect()
|
||||||
texte3.rect.centerx = 360
|
texte3.rect.centerx = 360
|
||||||
texte3.rect.centery = 80
|
texte3.rect.centery = 80
|
||||||
liste_des_sprites.add(texte3)
|
liste_des_sprites.add(texte3)
|
||||||
|
|
||||||
police = pygame.font.Font(None, 20)
|
police = pygame.font.Font(None, 20)
|
||||||
texte4 = pygame.sprite.Sprite()
|
texte4 = pygame.sprite.Sprite()
|
||||||
texte4.image = police.render("Bonne chance!", 1, (10, 10, 10),(255, 90, 20))
|
texte4.image = police.render("Bonne chance!", 1, (10, 10, 10),(255, 90, 20))
|
||||||
texte4.rect = texte4.image.get_rect()
|
texte4.rect = texte4.image.get_rect()
|
||||||
texte4.rect.centerx = 360
|
texte4.rect.centerx = 360
|
||||||
texte4.rect.centery = 100
|
texte4.rect.centery = 100
|
||||||
liste_des_sprites.add(texte4)
|
liste_des_sprites.add(texte4)
|
||||||
|
|
||||||
police = pygame.font.Font(None, 20)
|
police = pygame.font.Font(None, 20)
|
||||||
texte5 = pygame.sprite.Sprite()
|
texte5 = pygame.sprite.Sprite()
|
||||||
texte5.image = police.render("ALERTE, PLANETE TERRE EST SOUS ATTAQUE", 1, (10, 10, 10),(255, 90, 20))
|
texte5.image = police.render("ALERTE, PLANETE TERRE EST SOUS ATTAQUE", 1, (10, 10, 10),(255, 90, 20))
|
||||||
texte5.rect = texte5.image.get_rect()
|
texte5.rect = texte5.image.get_rect()
|
||||||
texte5.rect.centerx = 360
|
texte5.rect.centerx = 360
|
||||||
texte5.rect.centery = 1500
|
texte5.rect.centery = 1500
|
||||||
liste_des_sprites.add(texte5)
|
liste_des_sprites.add(texte5)
|
||||||
|
|
||||||
gameover = False
|
gameover = False
|
||||||
score = 0
|
score = 0
|
||||||
|
|
||||||
while running:
|
while running:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user