Browse Source

mise à jour class sword le perso à une épée

master
philippot.m 1 week ago
parent
commit
a318d84b42
  1. 25
      cubeshot.py

25
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()

Loading…
Cancel
Save