1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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<xlsItemKind>
- static itemMoney:ConfProxy<xlsItemMoney>
- static mathInfo:ConfProxy<xlsMathInfo>
- static packageInfo:ConfProxy<xlsPackageInfo>
- static languageLang:ConfProxy<xlsLanguageLang>
- static languageClientText:ConfProxy<xlsLanguageClientText>
- static languageSeverHouduan:ConfProxy<xlsLanguageSeverHouduan>
- static audioInfo:ConfProxy<xlsAudioInfo>
- static guideInfo:ConfProxy<xlsGuideInfo>
- static guideInfoList:ConfListProxy<xlsGuideInfo>
- 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)
- }
- }
- }
|