mapserver/src/XNetEventKeys.ts
2025-12-31 19:46:37 +08:00

203 lines
4.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 子报文类型msgType)列表
*/
export class XNetEventKeys {
//服务端报文,这里改动,服务端也要改动
/******************** SERVER_EVENT_KEYS ********************/
/**
* 客户端订阅实例
*/
public static readonly SUBSCRIBE_ROOM = 0x0000;
/**
* 登录
*/
public static readonly LOGIN = 0x0001;
/**
* 房间群发信息
*/
public static readonly ROOM_MSG = 0x0002;
/**
* 房间群发信息,自己不接收
*/
public static readonly ROOM_MSG_OTHER = 0x0003;
/******************** SERVER_EVENT_KEYS ********************/
/// <summary>
/// 用户下线
/// </summary>
public static readonly OFFLINE = 0x0004;
/// <summary>
/// 用户做主机
/// </summary>
public static readonly HOST = 0x0005;
/// <summary>
/// 本局游戏结束
/// </summary>
public static readonly GAME_END = 0x0006;
/// <summary>
/// 心跳包请求
/// </summary>
public static readonly HEART_BEAT = 0x0007;
/// <summary>
/// 心跳包响应
/// </summary>
public static readonly HEART_BEAT_REPLY = 0x0008;
/**
* 加入或者创建房间
*/
public static readonly CREATE_OR_JOIN_ROOM = 0x0009;
/**
* 个人私有的消息
*/
public static readonly PRIVATGE = 0x0010;
/**
* 添加AI玩家
*/
public static readonly ADD_AI_PLAYER = 0x0011;
/**
* 删除所有AI
*/
public static readonly DELETE_ALL_AI_PLAYER = 0x0012;
/**
* 发送给自己的消息
*/
public static readonly TO_SELF = 0x0013;
/**
* 公开或者关闭房间
*/
public static readonly ENABLE_ROOM_PUBLIC = 0x0014;
/**
* 启用或者关闭AI
*/
public static readonly ENABLE_AI = 0x0015;
/**
* 游戏将要结束,改变倒计时文字为闪烁或红色
*/
public static readonly GAME_WILLOVER = 0x0016;
/**
* 本局游戏将要结束
*/
public static readonly GAME_WILL_END = 0x0017;
/**
* Agent位置角度同步消息
*/
public static readonly AGENT_LOCATION_SYNC = 0x0018;
/**
* Agent角度同步消息
*/
public static readonly AGENT_ROTATION_SYNC = 0x0019;
/**
* 用户上线
*/
public static readonly ONLINE = 0x0020;
//客户端报文
/******************** CLIENT_EVENT_KEYS ********************/
/**
* 添加玩家
*/
public static readonly ADD_OR_UPDATE_PLAYER = 0x1004;
/**
* 玩家移动
*/
public static readonly SYNC_POS_ROT = 0x1005;
/**
* 玩家组移动
*/
public static readonly SYNC_POS_ROT_ARR = 0x1006;
/**
* 玩家发射炮弹
*/
public static readonly SYNC_SHOT = 0x1007;
/**
* 玩家收到被击中信息
*/
public static readonly SYNC_HIT = 0x1008;
/**
* 玩家收到被击毁信息
*/
public static readonly BOOM = 0x1009;
/**
* 玩家收到重生信息
*/
public static readonly REBORN = 0x1010;
/**
* 玩家请求导航点信息或者初始化
*/
public static readonly REQUEST_PATH = 0x1011;
/**
* 锁定对象信息
*/
public static readonly LOCK_TARGET = 0x1012;
/**
* 设置玩家坐标点,欧拉角位置信息,并解锁服务端移动
*/
public static readonly LOCATION = 0x1013;
/**
* 玩家或者AI请求初始化
*/
public static readonly REQUEST_INIT = 0x1014;
/**
* 开局信息,收到后开始读取地图
*/
public static readonly START_LOAD_MAP = 0x1015;
/**
* 更改房间MapKey 和 Name
*/
public static readonly CHANGE_ROOM_KEY_NAME = 0x1016;
/**
* 玩家进入地图场景
*/
public static readonly PLAYER_ENTER_MAP = 0x1017;
/**
* 获取小于等于指定人数的房间
*/
public static readonly GET_ROOM_FOR_COUNT = 0x1018;
/**
* 获取开始游戏的房间
*/
public static readonly GET_ROOM_FOR_START = 0x1019;
/**
* 获取到 LOBBY_ROOM 普通消息
*/
public static readonly GET_LOBBY_ROOM_MESSAGE = 0x1020;
/**
* 退出当前所在的房间
*/
public static readonly LEAVE_ROOM = 0x1021;
/******************** CLIENT_EVENT_KEYS ********************/
}