MsgId 这里是放需要的功能逻辑(与服务器放一起并且客户端也得一致)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FWQ1
{
class MsgId
{
public static int C2S_CHAT = 1000;
public static int S2C_CHAT = 1001;
//登录消息的ID
public static int C2S_LOGIN = 1002;
public static int S2C_LOGIN = 1003;
//上下线获取ID
//获取在线列表
public static int C2S_OTHER = 1004;
public static int S2C_OTHER = 1005;
//通知其他玩家,有用户上线了
public static int S2C_ONLINE = 1006;
//通知用户下线
public static int S2C_LEVEL = 1007;
//移动
public static int C2S_Move = 1008;
public static int S2C_Move = 1009;
//攻击其它玩家
public static int C2S_HURT = 10014;
public static int S2C_HURT = 10015;
//子弹ID
public static int C2S_BULLET = 10016;
public static int S2C_BULLET = 10017;
//add by zgebfxf about "房间的消息id" 2022-6-5 -----begin-----
//创建房间
public static int C2S_CREATEROOM = 10018;
public static int S2C_CREATEROOM = 10019;
//add by zgebfxf about "房间的消息id" 2022-6-5 -----end-----
//获取房间列表
public static int C2S_GETROOMLIST = 10020;
public static int S2C_GETROOMLIST = 10021;
//加入房间
public static int C2S_ADDROOM = 10022;
public static int S2C_ADDROOM = 10023;
public static int S2C_OTHERADDROOM = 10024; //其他用户加入房间
//add by zhengxf about "房间的消息id" 2022-6-5 ------end-----
}
}