class Layers extends eui.UILayer {
    private _topLayer: egret.Sprite;
    private _popupLayer: egret.Sprite;
    private _sceneLayer: egret.Sprite;
    private _bottomLayer: egret.Sprite;
    private _toastLayer: egret.Sprite;
    private _shareLayer: egret.Sprite;
    init(root: eui.UILayer) {
        root.addChild(this);
        this._topLayer = new egret.Sprite();
        this._popupLayer = new egret.Sprite();
        this._sceneLayer = new egret.Sprite();
        this._bottomLayer = new egret.Sprite();
        this._toastLayer = new egret.Sprite();
        this._shareLayer = new egret.Sprite();
        this.addChild(this._bottomLayer);
        this.addChild(this._sceneLayer);
        this.addChild(this._popupLayer);
        this.addChild(this._topLayer);
        this.addChild(this._toastLayer);
        this.addChild(this._shareLayer);
    }

    // _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 shareLayer() { return this._shareLayer }
    get topLayer() { return this._topLayer }
    get popupLayer() { return this._popupLayer }
    get sceneLayer() { return this._sceneLayer }
    get toastLayer() { return this._toastLayer }

}

const layers = new Layers();
export default layers