class Layers extends eui.UILayer {
    private _topLayer: eui.UILayer;
    private _popupLayer: eui.UILayer;
    private _sceneLayer: eui.UILayer;
    private _loadingLayer: 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._loadingLayer = new eui.UILayer();
        this.addChild(this._sceneLayer);
        this.addChild(this._popupLayer);
        this.addChild(this._topLayer);
        this.addChild(this._loadingLayer);

        this._popupLayer.visible = false;
        this._topLayer.visible = false;
        this._loadingLayer.visible = false;
        // this._sceneLayer.percentHeight = 100;
    }

    get topLayer() {
        return this._topLayer
    }

    get loadingLayer() {
        return this._loadingLayer
    }

    get popupLayer() {
        return this._popupLayer
    }

    get sceneLayer() {
        return this._sceneLayer
    }

}

const instance = new Layers();
export default instance