我想创建一个类Player继承Sprite,达到的效果是直接 local player = Player.create()就可以生成一个对象。代码如下:
local Player = class("Player", function() return cc.Sprite:create() end) function Player.create() local player Player.new() return player end function Player:ctor() self.super.ctor(self, 'player.png') -- 其他初始化代码 end return Player ``` 可是编译的时候报错,说不存在super成员,这是怎么回事?应该怎么正确地继承呢? 谢谢