export class LayerManager
{
    private static _ins:LayerManager = null;
    static get Ins(){
        if(!this._ins){
            this._ins = new LayerManager();
        }
        return this._ins;
    }

    bgLayer:engine.Sprite;
    enemyLayer:engine.Sprite;
    playerLayer:engine.Sprite;
    bulletLayer:engine.Sprite;
    buffLayer:engine.Sprite;
    effectLayer:engine.Sprite;
    uiLayer:engine.Sprite;

    initLayer(view:engine.Container){
        var that = this;
        that.bgLayer = new engine.Sprite();
        view.addChild(that.bgLayer);
        that.enemyLayer = new engine.Sprite();
        view.addChild(that.enemyLayer);
        that.playerLayer = new engine.Sprite();
        view.addChild(that.playerLayer);
        that.bulletLayer = new engine.Sprite();
        view.addChild(that.bulletLayer);
        that.buffLayer = new engine.Sprite();
        view.addChild(that.buffLayer);
        that.effectLayer = new engine.Sprite();
        view.addChild(that.effectLayer);
        that.uiLayer = new engine.Sprite();
        view.addChild(that.uiLayer);
    }
}