public void SendUnitTargetSkillUseOperate(short skillId, int unitId) { RqBattleInstruction rqInstruction = new RqBattleInstruction(); rqInstruction.instruction = new BattleUnitTargetSkill(unitId, skillId); GameMain.Instance.SocketMgr.SendMessage(RqId.BattleInstruction, rqInstruction); }
public void SendAreaUseSkillOperate(short skillId, short angle, int param1) { RqBattleInstruction rqInstruction = new RqBattleInstruction(); rqInstruction.instruction = new BattleAreaTargetSkill(skillId, angle, param1); GameMain.Instance.SocketMgr.SendMessage(RqId.BattleInstruction, rqInstruction); }
public void StopMoveOperate() { Logger.LogInfo("发送停止移动"); RqBattleInstruction rqInstruction = new RqBattleInstruction(); rqInstruction.instruction = new BattleStopMove(); GameMain.Instance.SocketMgr.SendMessage(RqId.BattleInstruction, rqInstruction); }
public void SendMoveOperate(short angle) { Logger.LogInfo("发送移动角度 " + angle); RqBattleInstruction rqInstruction = new RqBattleInstruction(); rqInstruction.instruction = new BattleMove(angle); GameMain.Instance.SocketMgr.SendMessage(RqId.BattleInstruction, rqInstruction); }
public static void OnOperateRequest(MyPeer peer, OperationRequest operationRequest) { LBPlayer curPlayer = LBPlayerManager.Instance.GetPlayerByConnectionId(peer.ConnectionId); if (curPlayer == null) { //LBLogger.Error("RqBattleInstructionHandler", "玩家没有登录"); return; } byte[] byteArray = RqBattleInstruction.Deserialization(operationRequest.Parameters); int index = 0; BattleInstructionBase battleInstruction = BattleInstructionBase.Deserializetion(byteArray, ref index); if (null == battleInstruction) { LBLogger.Error("RqBattleInstructionHandler", "消息解析失败"); return; } LBSceneManager.Instance.PlayerBattleInstruction(curPlayer.PlayerId, battleInstruction); }