Config.ts 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { InGame, Lang } from "./data/const/TypeConst"
  2. export default class Config {
  3. public static pid: string = "1"
  4. public static appVersion: string = '1.0.0'
  5. public static GAME_FRAME: number = 60
  6. public static wxOpenId: string = ""
  7. public static wxSign: string = ""
  8. public static policy: string = "" //隐私协议是否默认勾选 没有配置或者配置1默认勾选,配置0默认不勾选
  9. public static kefu: string = "" //1开启客服按钮,0或者空关闭客服按钮
  10. public static showTips: string = "1" //是否显示启动页0.1折的提示
  11. public static showTipType: string = "1" //显示启动页0.1折提示图片
  12. public static showAgeTip: string = "16" //显示启动页适龄图片
  13. public static showBgType: string = "0" //显示启动页背景图片
  14. public static openTD: number = 0 //数数数据上报开关
  15. public static adVideo: string = "1" //是否有广告 0关,1开
  16. public static inGame: InGame = 0
  17. public static lang: string = Lang.lang_zh_cn
  18. public static beianUrl:string = ""//备案网址
  19. // public static showZhenFaTips: boolean = true// 阵法替换或出售时的提示开关
  20. // public static showGuZiTips: boolean = true// 大帝古字的古字处理提示开关
  21. public static serverEachTag: number = 20 // 每个标签带有的区服数量
  22. public static remoteVersionUrl: string = "https://shkaifa.xmsgame.com:3111/player/getVersion" // H5小游戏2 获取远程配置版本号地址.写死
  23. public static isPad: boolean = false
  24. public static upid: any
  25. public static upFrame: any //每帧定时器
  26. public static upFight: any //战斗内加速定时器
  27. public static upZhenWen: any // 阵纹召唤定时器
  28. // x:x方向的安全区域(从左下方计算) y:y方向的安全区域(左下方计算) width:横向宽度 height:纵向宽度
  29. // yMax: 1519.2757009345794
  30. // yMin: 底部安全区域以上的起始点,比如 50, 表示底部黑色区域50
  31. // yMax: 顶部安全区域到达点,比如1650 代表1650像素以上都是黑色区域
  32. static safeAreaRect: { x: number, y: number, width: number, height: number, yMin: number, yMax: number } =
  33. { x: 0, y: 0, width: 750, height: 1334, yMax: 0, yMin: 0 }
  34. // 屏幕真实宽度(考虑刘海屏)
  35. static realHeight: number = 1334
  36. static paySuccAdokId: any // 支付回调成功定时器
  37. static paySuccAdokIndex: number = 0
  38. static homeBgMaxOffsetY: number = 140 //主页背景图和炉鼎 1750 尺寸下,上移此像素
  39. static menuBottomMaxOffsetY: number = 80 //底部菜单 1750 尺寸下,上移此像素
  40. static homeBgRealOffsetY: number = 0 // 真实偏移量
  41. static menuBottomRealOffsetY: number = 0 // 真实偏移量
  42. static battleDebug: boolean = false // 战斗调试
  43. }