class Layers extends eui.UILayer {
    private _topLayer: eui.UILayer;
    private _popupLayer: eui.UILayer;
    private _sceneLayer: eui.UILayer;
    private _bottomLayer: eui.UILayer;
    init(root: eui.UILayer) {
        root.addChild(this);
        this._topLayer = new eui.UILayer();
        this._popupLayer = new eui.UILayer();
        this._sceneLayer = new eui.UILayer();
        this._bottomLayer = new eui.UILayer();
        this._topLayer.visible = false;
        this._popupLayer.visible = false;
        this._bottomLayer.visible = false;
        this.addChild(this._bottomLayer);
        this.addChild(this._sceneLayer);
        this.addChild(this._popupLayer);
        this.addChild(this._topLayer);
    }

    // _bg: egret.Bitmap;
    // addFirstBackground(bitmap: egret.Bitmap): any {
    //     this._bg = bitmap;
    //     this._bottomLayer.addChild(bitmap);
    // }

    // removeFirstBackground(): any {
    //     egret.Tween.get(this._bg).to({ alpha: 0 }, 700).call(() => {
    //         this._bottomLayer.removeChild(this._bg);
    //         this._bg = null;
    //     })
    // }

    get topLayer() { return this._topLayer }
    get popupLayer() { return this._popupLayer }
    get sceneLayer() { return this._sceneLayer }

}

const layers = new Layers();
export default layers