mirror of
https://github.com/Fare-spec/cours.git
synced 2025-12-07 10:50:36 +00:00
starting to recreate the wallbreacker
This commit is contained in:
27
pygame/jeu/jeu.py
Normal file
27
pygame/jeu/jeu.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from pygame.jeu import niveau
|
||||
|
||||
|
||||
class Jeu:
|
||||
def __init__(self) -> None:
|
||||
self.niveau = niveau.Niveau()
|
||||
self.vie = 3
|
||||
self.bouge = False
|
||||
self.etat = 1
|
||||
|
||||
def gereJeu(self,ecran):
|
||||
if self.etat == 1:
|
||||
pass
|
||||
elif self.etat == 2:
|
||||
for event in pygame.event.get():
|
||||
if event.type() == pygame.QUIT:
|
||||
sys.exit
|
||||
elif event.type == pygame.MOUSEBUTTONDOWN:
|
||||
self.bouge = True
|
||||
else:
|
||||
self.bouge = True
|
||||
niveau.affiche(ecran)
|
||||
if self.bouge:
|
||||
self.etat = 1
|
||||
return 1
|
||||
elif self.etat == 2:
|
||||
self.etat = niveau.
|
||||
14
pygame/jeu/niveau.py
Normal file
14
pygame/jeu/niveau.py
Normal file
@@ -0,0 +1,14 @@
|
||||
class Niveau:
|
||||
def __init__(self) -> None:
|
||||
self.b1 = balle.Balle()
|
||||
self.r1 = raquette.Raquette()
|
||||
self.m1 = murdebrique.Wall()
|
||||
|
||||
def affiche(self,ecran):
|
||||
ecran.fill(BLANC)
|
||||
self.b1.affiche(ecran)
|
||||
self.r1.affiche(ecran)
|
||||
self.m1.affiche(ecran)
|
||||
|
||||
def levelmanager():
|
||||
for event in pygame.
|
||||
Reference in New Issue
Block a user