Browse Source

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

master
philippot.m 2 weeks ago
parent
commit
a318d84b42
  1. 17
      cubeshot.py

17
cubeshot.py

@ -52,15 +52,26 @@ class Canon:
self.y=uny self.y=uny
class Sword: class Sword:
def __init__(self,unx,uny): def __init__(self,unx,uny,uncanvas,uncolor):
self.x=unx self.x=unx
self.y=uny 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: class Boss:
def __init__(self,unx,uny,unlong,unlarge,uncanvas,uncolor,unvie): def __init__(self,unx,uny,unlong,unlarge,uncanvas,uncolor,unvie):
self.corp=Corp_boss(unx,uny,unlong,unlarge,uncanvas,uncolor) self.corp=Corp_boss(unx,uny,unlong,unlarge,uncanvas,uncolor)
self.c=uncanvas
self.canon=Canon(0,0) self.canon=Canon(0,0)
self.sword=Sword(0,0)
self.c=uncanvas
self.vie=unvie
################################Perso################################ ################################Perso################################
class Personnage: class Personnage:
@ -84,6 +95,7 @@ class Personnage:
self.couleur) self.couleur)
self.vitesse=unvitesse self.vitesse=unvitesse
self.acceleration=unacceleration self.acceleration=unacceleration
self.epe=Sword(self.x,self.y,self.canvas,self.couleur)
def deplace(self,dx,dy): def deplace(self,dx,dy):
self.x= dx self.x= dx
@ -144,7 +156,6 @@ def dash(event):
perso.droit(10) perso.droit(10)
def shoot(event): def shoot(event):
if shotgun ==False:
chevrotine = Tir_p(c,perso.p) chevrotine = Tir_p(c,perso.p)
chevrotine.start() chevrotine.start()

Loading…
Cancel
Save