
import {ResourceCon} from "./other/ResourceCon";
import {SceneBeforeCall} from "./other/SceneBeforeCall";
import {YtAssetsManager} from "../libs/yt/index"
//import {YtSceneManager} from "duiba-yt";
import {YtSceneManager} from "../libs/yt/index"
import {YtModuleManager} from "../libs/yt/index";
import {YtDisplayPool} from "../libs/yt/index";
import {ExGameSceneCon} from "./GameScene3D/ExGameSceneCon";
import {SlModuleName} from "../libs/sl/index";
export class Before{


    private static instance: Before;

    public static get ins(): Before {
        if (!this.instance) {
            this.instance = new Before();
        }
        return this.instance;
    }

    public init(){
       // document.getElementById("_a2x_canvas").style.position = "absolute";
       // document.getElementById("_a2x_canvas").setAttribute("touch-action","none");
        YtAssetsManager.ins.resourceData=ResourceCon.ins.resource;
        this.initModule()
        YtAssetsManager.ins.loadFile(["gameScene"],YtSceneManager.ins.scene,function(){
            YtModuleManager.ins.init();
            YtModuleManager.ins.openModule(SlModuleName.GAME_PLAY_SCENE);
            SceneBeforeCall.ins.musicLoop();
        }.bind(this),function(e){
            console.log(e.loadCount)
        }.bind(this))
    }


    /**
     * 3D场景模块
     * */

    public initModule(){
        //游戏3D场景
        ExGameSceneCon.ins.init();
    }

}
