From a318d84b427637036b218e039e438945a6f4f6b7 Mon Sep 17 00:00:00 2001 From: "philippot.m" <> Date: Tue, 8 Apr 2025 21:39:00 +0200 Subject: [PATCH] =?UTF-8?q?mise=20=C3=A0=20jour=20class=20sword=20le=20per?= =?UTF-8?q?so=20=C3=A0=20une=20=C3=A9p=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cubeshot.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/cubeshot.py b/cubeshot.py index 7da5d2c..44dfd54 100644 --- a/cubeshot.py +++ b/cubeshot.py @@ -52,15 +52,26 @@ class Canon: self.y=uny class Sword: - def __init__(self,unx,uny): + def __init__(self,unx,uny,uncanvas,uncolor): self.x=unx self.y=uny + self.c=uncanvas + self.col=uncolor + def affiche_sword(self): + self.manche=self.c_rectangle() + self.sword=self.c_rectangle() + + def coup_base(self): + pass class Boss: def __init__(self,unx,uny,unlong,unlarge,uncanvas,uncolor,unvie): self.corp=Corp_boss(unx,uny,unlong,unlarge,uncanvas,uncolor) - self.c=uncanvas self.canon=Canon(0,0) + self.sword=Sword(0,0) + self.c=uncanvas + self.vie=unvie + ################################Perso################################ class Personnage: @@ -84,6 +95,7 @@ class Personnage: self.couleur) self.vitesse=unvitesse self.acceleration=unacceleration + self.epe=Sword(self.x,self.y,self.canvas,self.couleur) def deplace(self,dx,dy): self.x= dx @@ -108,7 +120,7 @@ class Personnage: def dead(self): self.canvas.delete(self.r) - + class Graviter(Thread): def __init__(self,unperso): Thread.__init__(self) @@ -144,14 +156,13 @@ def dash(event): perso.droit(10) def shoot(event): - if shotgun ==False: - chevrotine = Tir_p(c,perso.p) - chevrotine.start() + chevrotine = Tir_p(c,perso.p) + chevrotine.start() def fall(): saut=Graviter(perso) saut.start() - + tir= Tk() c= Canvas(width =1900,height =900,bg="black") c.pack()