import ConfProxy, { ConfListProxy } from "./confProxy" import { XlsConfig, xlsItemKind, xlsItemMoney, xlsMathInfo, xlsPackageInfo, xlsLanguageLang, xlsLanguageClientText, xlsLanguageSeverHouduan , xlsAudioInfo, xlsGuideInfo } from "./xlsConfig" export default class Gamecfg { static itemKind:ConfProxy static itemMoney:ConfProxy static mathInfo:ConfProxy static packageInfo:ConfProxy static languageLang:ConfProxy static languageClientText:ConfProxy static languageSeverHouduan:ConfProxy static audioInfo:ConfProxy static guideInfo:ConfProxy static guideInfoList:ConfListProxy static initLoading(loadSuccess: Function) { try { new XlsConfig("loadJson",(xls: XlsConfig) => { Gamecfg.mathInfo = new ConfProxy("mathInfo",xls.xlsMathInfo ,"key") Gamecfg.packageInfo = new ConfProxy("packageInfo",xls.xlsPackageInfo ,"id") Gamecfg.languageLang = new ConfProxy("languageLang",xls.xlsLanguageLang ,"key") Gamecfg.languageClientText = new ConfProxy("languageClientText",xls.xlsLanguageClientText ,"key") Gamecfg.audioInfo = new ConfProxy("audioInfo",xls.xlsAudioInfo ,"id") loadSuccess(true) }) } catch (error) { loadSuccess(false) } } static init(loadSuccess: Function, progressCallback: Function) { try { new XlsConfig("pzwj",(xls: XlsConfig) => { Gamecfg.itemKind = new ConfProxy("itemKind",xls.xlsItemKind ,"kind") Gamecfg.itemMoney = new ConfProxy("itemMoney",xls.xlsItemMoney ,"id") Gamecfg.languageSeverHouduan = new ConfProxy("languageSeverHouduan",xls.xlsLanguageSeverHouduan ,"key") Gamecfg.guideInfo = new ConfProxy("guideInfo",xls.xlsGuideInfo ,"id") Gamecfg.guideInfoList = new ConfListProxy("guideInfoList",xls.xlsGuideInfo ,"event") loadSuccess(true) }, progressCallback) } catch (error) { loadSuccess(false) } } }