import ConfProxy, { ConfListProxy } from "./confProxy" import { XlsConfig, xlsAttrAttr, xlsAudioInfo, xlsChapterInfo, xlsChapterLayout, xlsEmitterInfo, xlsGuideInfo, xlsItemKind , xlsKaiqiInfo, xlsLanguageLang, xlsLanguageClientText, xlsLanguageSeverHouduan, xlsMathInfo, xlsMergePropInfo, xlsNameName, xlsPackageInfo, xlsPingbiciInfo } 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 kaiqiInfo:ConfProxy static languageLang:ConfProxy static languageClientText:ConfProxy static languageSeverHouduan:ConfProxy static mathInfo:ConfProxy static mergePropInfo:ConfProxy static nameName:ConfProxy static packageInfo:ConfProxy static pingbiciInfo: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.kaiqiInfo = new ConfProxy("kaiqiInfo",xls.xlsKaiqiInfo ,"id") Gamecfg.languageSeverHouduan = new ConfProxy("languageSeverHouduan",xls.xlsLanguageSeverHouduan ,"key") Gamecfg.mergePropInfo = new ConfProxy("mergePropInfo",xls.xlsMergePropInfo ,"id") Gamecfg.nameName = new ConfProxy("nameName",xls.xlsNameName ,"frist") Gamecfg.pingbiciInfo = new ConfProxy("pingbiciInfo",xls.xlsPingbiciInfo ,"id") loadSuccess(true) }, progressCallback) } catch (error) { loadSuccess(false) } } }