微信小游戏转译TypeError: Cannot read property '__proto__' of undefined?

clipboard.png
在chrome下没问题,移植到微信小程序就。。
继承关系: upPencil extend pencils extend sprite

export class upPencil extends pencils{
    constructor(passTop){
        const image = dataStore.getInstance().res.get('upPencil');
        const y = passTop - image.height;
        super(image,y);
        this.type = "up"
    }
    draw(){                     
      
        super.draw()
    }
}

clipboard.png

调用开始处:

   pencil.draw(); //画出每个铅笔

pencils中出错位置

            _get(pencils.prototype.__proto__ || Object.getPrototypeOf(pencils.prototype), "draw", this).call(this);

pencil中出错位置

    _createClass(upPencil, [{
        key: "draw",
        value: function draw() {
            //this.y = this.top -this.srcH;
            _get(upPencil.prototype.__proto__ || Object.getPrototypeOf(upPencil.prototype), "draw", this).call(this);
        }
    }]);
阅读 2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题