1 changed files with 46 additions and 0 deletions
@ -0,0 +1,46 @@ |
|||||
|
""" |
||||
|
Jeu cars and run 2D |
||||
|
|
||||
|
Script python: |
||||
|
""" |
||||
|
import pygame |
||||
|
from pygame.locals import * |
||||
|
from constantes import * |
||||
|
|
||||
|
pygame.init() |
||||
|
|
||||
|
#ouverture de la fenetre |
||||
|
fenetre = pygame.display.set_mode((largeur_fenetre, hauteur_fenetre)) |
||||
|
fenetre.fill((0,128,255)) |
||||
|
|
||||
|
#Icone |
||||
|
icone = pygame.image.load(image_icone) |
||||
|
pygame.display.set_icon(icone) |
||||
|
|
||||
|
#Titre |
||||
|
pygame.display.set_caption(titre_fenetre) |
||||
|
|
||||
|
|
||||
|
|
||||
|
continuer = 1 |
||||
|
|
||||
|
while continuer: |
||||
|
for event in pygame.event.get(): #Attente des événements |
||||
|
if event.type == QUIT: |
||||
|
continuer = 0 |
||||
|
|
||||
|
#BOUCLE DE JEU: |
||||
|
if event.type == KEYDOWN: |
||||
|
|
||||
|
|
||||
|
if event.key == K_F1: |
||||
|
#boucle acceuil |
||||
|
fenetre.fill((0,0,0)) |
||||
|
if event.key == K_F1: |
||||
|
#boucle niveau |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
pygame.display.flip() |
||||
|
|
||||
|
pygame.quit() |
Loading…
Reference in new issue