import {YtResourceData} from "../../libs/yt/index"

export class ResourceCon {

    private _resource;

    private static instance: ResourceCon;

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

    private pathFirst=window["resPath"]

    constructor(){
        let gameScene:YtResourceData;
        let rulePanel:YtResourceData;
        let optionsPanel:YtResourceData;
        let overOptionPanel:YtResourceData;
        let loadingScene:YtResourceData;

        gameScene={
            binarys:[
               /*  {name:"road_11", filePath:this.pathFirst+"src/Resource/gameScene/models/road_11/", fileName:"road_12.binary.babylon"}, */
               {name:"boom", filePath:this.pathFirst+"src/Resource/gameScene/binarys/", fileName:"boom.mp3"},
                {name:"button", filePath:this.pathFirst+"src/Resource/gameScene/binarys/", fileName:"button.mp3"},
                {name:"light", filePath:this.pathFirst+"src/Resource/gameScene/binarys/", fileName:"light.mp3"},
                {name:"pick", filePath:this.pathFirst+"src/Resource/gameScene/binarys/", fileName:"pick.mp3"},
            ],
            images:[
               /*  {name:"beginBtn", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"beginBtn.png",},
                {name:"bg", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"bg.jpg",},
                {name:"close", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"close.png",},
                {name:"win_m", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"win_m.png",},
                {name:"bg_modle", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"bg_modle.png",},             
                {name:"btn_left", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"btn_left.png",},
                {name:"btn_right", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"btn_right.png",},
                {name:"btn_boom", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"btn_boom.png",},
                {name:"btn_py", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"btn_py.png",},
                {name:"btn_dq", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"btn_dq.png",},
                {name:"prizeBtn", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"prizeBtn.png",},
                {name:"ruleBtn", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"ruleBtn.png",},
                {name:"realTimeRankBtn", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"realTimeRankBtn.png",},
                {name:"recordBtn", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"recordBtn.png",},
                {name:"shujugui", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"shujugui.png",},
                {name:"go", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"go.png",},
                {name:"tips", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"tips2.png",},
                {name:"gold_bg", filePath:this.pathFirst+"src/Resource/gameScene/images/", fileName:"gold_bg.png",}, */
            ],
            models:[
               /*  {name:"car3", filePath:this.pathFirst+"src/Resource/gameScene/models/car3/", fileName:"car5.babylon"},
                {name:"road_11", filePath:this.pathFirst+"src/Resource/gameScene/models/road_15/", fileName:"road_26.babylon"},
                {name:"boom", filePath:this.pathFirst+"src/Resource/gameScene/models/boom/", fileName:"boom.babylon"},
                {name:"gold", filePath:this.pathFirst+"src/Resource/gameScene/models/gold/", fileName:"gold.babylon"},
                {name:"speed", filePath:this.pathFirst+"src/Resource/gameScene/models/speed/", fileName:"speed2.babylon"}, */
            ],
            textures:[
                {name:"flare", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"flare.png"},
                {name:"flare2", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"flare2.jpg"},
                {name:"b_1", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"b_1.png"},
                {name:"b_2", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"b_2.png"},
                {name:"b_3", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"b_3.png"},
                {name:"b_4", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"b_4.png"},
                {name:"b_5", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"b_5.png"},
                {name:"b_6", filePath:this.pathFirst+"src/Resource/gameScene/textures/", fileName:"b_6.png"},
            ],
            cubeTextures:[
               // {name:"sky2", filePath:this.pathFirst+"src/Resource/gameScene/cubeTextures/sky2/", fileName:"sky2",}
            ]
        };

        rulePanel={
            binarys:[],
            images:[
              /*   {name:"bg", filePath:this.pathFirst+"src/Resource/rulePanel/images/", fileName:"win.png"},
                {name:"closeBtn", filePath:this.pathFirst+"src/Resource/rulePanel/images/", fileName:"closeBtn.png"} */
            ],
            models:[],
            textures:[],
            cubeTextures:[]
        }

        optionsPanel={
            binarys:[],
            images:[
               /*  {name:"title", filePath:this.pathFirst+"src/Resource/optionsPanel/images/", fileName:"title.png"}, */
            ],
            models:[],
            textures:[],
            cubeTextures:[]
        }

        overOptionPanel={
            binarys:[],
            images:[
               /*  {name:"againBtn", filePath:this.pathFirst+"src/Resource/overOptionPanel/images/", fileName:"againBtn.png"},
                {name:"useBtn", filePath:this.pathFirst+"src/Resource/overOptionPanel/images/", fileName:"useBtn.png"},
                {name:"winBg", filePath:this.pathFirst+"src/Resource/overOptionPanel/images/", fileName:"winBg.png"}, */
            ],
            models:[],
            textures:[],
            cubeTextures:[]
        }


        loadingScene={
            binarys:[],
            images:[
               /*  {name:"win_m", filePath:this.pathFirst+"src/Resource/loadingScene/images/", fileName:"win_m.png",},
                {name:"bg_modle", filePath:this.pathFirst+"src/Resource/loadingScene/images/", fileName:"bg_modle.png",},
                {name:"loading_bg", filePath:this.pathFirst+"src/Resource/loadingScene/images/", fileName:"loading-bg.jpg",}, */
            ],
            models:[],
            textures:[],
            cubeTextures:[]
        };

        this._resource={
            gameScene:gameScene,
            rulePanel:rulePanel,
            optionsPanel:optionsPanel,
            overOptionPanel:overOptionPanel,
            loadingScene:loadingScene,
        }
    }

    public get resource(): object {
        return this._resource;
    }
}