ConfigData.ts 516 B

12345678910111213141516
  1. export class ConfigData {
  2. configNames = ['build', 'level', 'lvlreward', 'make', 'product', 'rank', 'withdraw'];
  3. public configMap: Map<string, any> = new Map();
  4. public async loadConfig() {
  5. for (let i = 0; i < this.configNames.length; i++) {
  6. let result = await (await mk.loader.load("game/coregame/configs/" + this.configNames[i], cc.JsonAsset)).json;
  7. this.configMap.set(this.configNames[i], result);
  8. }
  9. // gData.gameData.setProductMapFromJson();
  10. }
  11. }