我是一名学生,所以我想弄清楚自己做错了什么。谁能发现我可能会做的事?
super(Fighter, self).__init__(modelPath, parentNode, nodeName, 0, 0, 0, 3.0, )
TypeError: __init__() takes at most 3 arguments (8 given)**
代码:
class Fighter(ShowBase, object):
fighterCount = 0
def __init__(self, modelPath, parentNode, nodeName, posVec, traverser, scaleVec = 1.0):
super(Fighter, self).__init__(modelPath, parentNode, nodeName, 0, 0, 0, 3.0, )
self.modelNode.setScale(scaleVec)
self.modelNode.setPos(posVec)
self.trav = traverser
self.origin = render.attachNewNode("origin")
self.origin.setPos(0, 0, 0)
self.origin.hide()
self.setKeyBindings()
self.hud = Hud("./Tools/Hud.x", self.modelNode, "Hud", (0, 10, 0))