GameServerConfig.ts 1.1 KB

12345678910111213141516171819202122232425
  1. /** 游戏服务器配置,给客户端读取使用 */
  2. export class GameServerConfig {
  3. public static isLocalServer: boolean = false;
  4. /** 游戏服务器地址 */
  5. // public static GAME_SERVER = 'wss://localcc.xmsgame.com:6000';
  6. public static GAME_SERVER = 'ws://106.55.54.28:7000';
  7. // public static GAME_SERVER = 'ws://192.168.31.231:4000';
  8. // public static GAME_SERVER = 'ws://192.168.31.229:3000';
  9. // public static GAME_SERVER = 'ws://192.168.31.8:3000';
  10. // public static ROOM_SERVER = location.hostname;
  11. /** 两个心跳数据包之间的间隔时间(单位:毫秒) */
  12. static heartbeat_interval: number = 1000;
  13. /** 如果在此期间心跳数据包没有得到回复,连接将被关闭(单位:毫秒) */
  14. static heartbeat_timeout: number = 3000;
  15. /** 客户端发送玩家状态信息的频率 */
  16. static player_state_update_rate: number = 0.066;
  17. /** 客户端同步版本号 */
  18. public static syncVersion: number = 1;
  19. /** 客户端版本号 */
  20. public static appVersion: number = 220;
  21. }