Global.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. const BuildingManager = require("../utils/BuildingManager");
  2. const ShareAction = require('./ShareAction');
  3. const AlertManager = require('../utils/AlertManager');
  4. const Platform = require('../common/Platform');
  5. const WechatShareType = require('../utils/GameEnum').WechatShareType;
  6. window.GameGlobal = {
  7. // 建筑管理
  8. BuildingManager: BuildingManager.instance,
  9. debug: true,
  10. ver: 108, //游戏版本号发版时需要核对
  11. isCheck: false,
  12. isMineEnter: false,
  13. /**
  14. * 点击别人分享的链接需要进行的操作 查看群排行
  15. */
  16. shareType: ShareAction.NONE,
  17. /**
  18. * 点击别人分享的链接获取到这个用户的uid,默认-1
  19. */
  20. shareUid: -1,
  21. //SystemInfo
  22. os: 1,//1 android,2 ios
  23. channel: null,
  24. user: null,
  25. /// 游戏是否退出到后台
  26. isOnHide: false,
  27. homeUpdate: true,
  28. wechatScoreKey: 'buildingLevel',
  29. // 开发中的城市Id
  30. devCityId: 1,
  31. buildRes: null,
  32. prefabsRes: null,
  33. starAvatarRes: null,
  34. starSpineRes: null,
  35. needLogin: false,
  36. /// 最后一个缩短技能cd的技能等级
  37. rcdSkillLevel: 0,
  38. //是否已领取当天签到奖励
  39. isSignAward: false,
  40. //已签到次数
  41. signCount: 0,
  42. //分享出去的群id
  43. shareTicket: '',
  44. //通用网络请求提示框
  45. commonAlert: AlertManager,
  46. //是否点击过分享
  47. clickShare: false,
  48. gameShareType: WechatShareType.None,
  49. //当前设备屏幕尺寸
  50. winSize: {height: 0, width: 0},
  51. };
  52. Platform.initPlatform();