def idle(self):
if self.imgcount > len(self.idle) - 1 :
self.imgcount = 0
if self.face == 'RIGHT':
image(self.idle[self.imgcount],self.vec.x,self.vec.y,self.w,self.h)
elif self.face == 'LEFT':
pushMatrix()
scale(-1,1)
image(self.idle[self.imgcount],-self.vec.x - self.w,self.vec.y,self.w,self.h)
popMatrix()
self.imgcount += 1
def show(self):
if not keyPressed:
idle()
How to make this code work? It says idle() doesnt exist
(and this what I expected),but idk how to make it work
Full code here