public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { switch (message.Command) { case FightProtocol.ENTER_CREQ: enterBattle(token); break; case FightProtocol.MOVE_CREQ: move(token, message.GetMessage <MoveDTO>()); break; case FightProtocol.ATTACK_CREQ: attack(token, message.GetMessage <int>()); break; case FightProtocol.DAMAGE_CREQ: damage(token, message.GetMessage <DamageDTO>()); break; case FightProtocol.SKILL_UP_CREQ: skillUp(token, message.GetMessage <int>()); break; case FightProtocol.SKILL_CREQ: skill(token, message.GetMessage <SkillAttackModel>()); break; } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { switch (message.command) { case ExploreProtocol.INPUT_CREQ: Input(message.GetMessage <byte[]>()); break; } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { switch (message.command) { case FightProtocol.ENTER_CREQ: enter(token); break; } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { int userId = getUserId(token); if (userRoom.ContainsKey(userId)) { int roomId = userRoom[userId]; if (roomMap.ContainsKey(roomId)) { roomMap[roomId].MessageReceive(token, message); } } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { switch (message.Command) { case MatchProtocol.ENTER_CREQ: //Console.WriteLine("角色发来匹配请求..."); enter(token); break; case MatchProtocol.LEAVE_CREQ: //Console.WriteLine("申请取消匹配..."); leave(token); break; } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { //if(roomMap.ContainsKey(message.Area)) //{ // roomMap[message.Area].MessageReceive(token, message); //} int userID = getUserID(token); if (userRoom.ContainsKey(userID)) { int roomID = userRoom[userID]; if (roomMap.ContainsKey(roomID)) { roomMap[roomID].MessageReceive(token, message); } } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { switch (message.command) { case SelectProtocol.ENTER_CREQ: enter(token); break; case SelectProtocol.SELECT_CREQ: select(token, message.GetMessage <int>()); break; case SelectProtocol.TALK_CREQ: talk(token, message.GetMessage <string>()); break; case SelectProtocol.READY_CREQ: ready(token); break; } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { switch (message.command) { case ExploreProtocol.ENTER_CREQ: enter(token, message.area); break; case ExploreProtocol.INFORM_CREQ: inform(token, message.area); break; case ExploreProtocol.LEAVE_CREQ: leave(token); break; default: roomMap[userRoom[getUserId(token)]].MessageReceive(token, message); break; } }
public void MessageReceive(NetFrame.UserToken token, NetFrame.auto.SocketModel message) { roomMap[userRoom[getUserId(token)]].MessageReceive(token, message); }