import ConfProxy, { ConfListProxy } from "./confProxy" import { XlsConfig, xlsAttrAttr, xlsAudioInfo, xlsChapterInfo, xlsChapterLayout, xlsEmitterInfo, xlsGuideInfo, xlsItemKind , xlsItemInfo, xlsKaiqiInfo, xlsLanguageLang, xlsLanguageClientText, xlsLanguageSeverHouduan, xlsLevelLevel, xlsMathInfo, xlsMergePropInfo, xlsMergeInfo , xlsEquipInfo, xlsNameName, xlsPackageInfo, xlsPingbiciInfo, xlsTaskDesc, xlsTaskMain } from "./xlsConfig" export default class Gamecfg { static attrAttr:ConfProxy static audioInfo:ConfProxy static chapterInfo:ConfProxy static chapterLayoutList:ConfListProxy static emitterInfo:ConfProxy static guideInfo:ConfProxy static guideInfoList:ConfListProxy static itemKind:ConfProxy static itemInfo:ConfProxy static kaiqiInfo:ConfProxy static languageLang:ConfProxy static languageClientText:ConfProxy static languageSeverHouduan:ConfProxy static levelLevel:ConfProxy static mathInfo:ConfProxy static mergePropInfo:ConfProxy static mergeInfo:ConfProxy static equipInfo:ConfProxy static nameName:ConfProxy static packageInfo:ConfProxy static pingbiciInfo:ConfProxy static taskDesc:ConfProxy static taskMain:ConfProxy static taskMainByNextid:ConfProxy static initLoading(loadSuccess: Function) { try { new XlsConfig("loadJson",(xls: XlsConfig) => { Gamecfg.audioInfo = new ConfProxy("audioInfo",xls.xlsAudioInfo ,"id") Gamecfg.languageLang = new ConfProxy("languageLang",xls.xlsLanguageLang ,"key") Gamecfg.languageClientText = new ConfProxy("languageClientText",xls.xlsLanguageClientText ,"key") Gamecfg.mathInfo = new ConfProxy("mathInfo",xls.xlsMathInfo ,"key") Gamecfg.packageInfo = new ConfProxy("packageInfo",xls.xlsPackageInfo ,"id") loadSuccess(true) }) } catch (error) { loadSuccess(false) } } static init(loadSuccess: Function, progressCallback: Function) { try { new XlsConfig("pzwj",(xls: XlsConfig) => { Gamecfg.attrAttr = new ConfProxy("attrAttr",xls.xlsAttrAttr ,"id") Gamecfg.chapterInfo = new ConfProxy("chapterInfo",xls.xlsChapterInfo ,"id") Gamecfg.chapterLayoutList = new ConfListProxy("chapterLayoutList",xls.xlsChapterLayout ,"infoId") Gamecfg.emitterInfo = new ConfProxy("emitterInfo",xls.xlsEmitterInfo ,"id") Gamecfg.guideInfo = new ConfProxy("guideInfo",xls.xlsGuideInfo ,"id") Gamecfg.guideInfoList = new ConfListProxy("guideInfoList",xls.xlsGuideInfo ,"event") Gamecfg.itemKind = new ConfProxy("itemKind",xls.xlsItemKind ,"kind") Gamecfg.itemInfo = new ConfProxy("itemInfo",xls.xlsItemInfo ,"id") Gamecfg.kaiqiInfo = new ConfProxy("kaiqiInfo",xls.xlsKaiqiInfo ,"id") Gamecfg.languageSeverHouduan = new ConfProxy("languageSeverHouduan",xls.xlsLanguageSeverHouduan ,"key") Gamecfg.levelLevel = new ConfProxy("levelLevel",xls.xlsLevelLevel ,"level") Gamecfg.mergePropInfo = new ConfProxy("mergePropInfo",xls.xlsMergePropInfo ,"id") Gamecfg.mergeInfo = new ConfProxy("mergeInfo",xls.xlsMergeInfo ,"id") Gamecfg.equipInfo = new ConfProxy("equipInfo",xls.xlsEquipInfo ,"id") Gamecfg.nameName = new ConfProxy("nameName",xls.xlsNameName ,"frist") Gamecfg.pingbiciInfo = new ConfProxy("pingbiciInfo",xls.xlsPingbiciInfo ,"id") Gamecfg.taskDesc = new ConfProxy("taskDesc",xls.xlsTaskDesc ,"kind") Gamecfg.taskMain = new ConfProxy("taskMain",xls.xlsTaskMain ,"id") Gamecfg.taskMainByNextid = new ConfProxy("taskMainByNextid",xls.xlsTaskMain ,"nextid") loadSuccess(true) }, progressCallback) } catch (error) { loadSuccess(false) } } }