Global.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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: false,
  10. ver: 100, //游戏版本号发版时需要核对
  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. appletAward: false,
  42. //判断是否使用本地数据
  43. localData: false,
  44. //已签到次数
  45. signCount: 0,
  46. //分享出去的群id
  47. shareTicket: '',
  48. //通用网络请求提示框
  49. commonAlert: AlertManager,
  50. //是否点击过分享
  51. clickShare: false,
  52. gameShareType: WechatShareType.None,
  53. //当前设备屏幕尺寸
  54. winSize: {height: 0, width: 0},
  55. };
  56. Platform.initPlatform();