this constructor takes no arguments 错误 15
classPlatformSprite(Sprite):def__init__(self,game,photo_image,x,y,width,height):Sprit...
class PlatformSprite(Sprite): def __init__(self, game, photo_image, x, y, width, height): Sprite.__init__(self, game) self.photo_image = photo_image self.image = game.canvas.create_image(x, y, image=self.photo_image, anchor='nw') self.coordinates = Coords(x, y, x + width, y + height)TypeError: this constructor takes no arguments
self.coordinates = Coords(x, y, x + width, y + height)
TypeError: this constructor takes no arguments
关于Coords:
class Coords:
def __int__(self, x1=0, y1=0, x2=0, y2=0):
self.x1 = x1
self.y1 = y1
self.x2 = x2
self.y2 = y2 展开
self.coordinates = Coords(x, y, x + width, y + height)
TypeError: this constructor takes no arguments
关于Coords:
class Coords:
def __int__(self, x1=0, y1=0, x2=0, y2=0):
self.x1 = x1
self.y1 = y1
self.x2 = x2
self.y2 = y2 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询