class BackGround extends Laya.Sprite{
constructor() {
super();
new init();
function init() {
var bg1 = new Laya.Sprite();
var bg2 = new Laya.Sprite();
//背景图
// box.loadImage("../bin/background.png");
// Laya.stage.addChild(box);
bg1.loadImage("../bin/background.png");
this.addChild(bg1);
bg2.loadImage("../bin/background.png");
bg2.pos(0,-852);
this.addChild(bg2);
用this.addchild老是出错