public void TrackPosition(Guid TankId, float x, float y, float z, float r) { try { TankPositionQueRequest tqr = new TankPositionQueRequest(_CurrentGameSessionId, TankId, x, y, z, r); m_client.Invoke("Que", tqr.CreateRequest(RequestProcessorEnum.TankPosition, _UserId).Serialize()); } catch (Exception E) { UnityEngine.Debug.Log(E.Message); } }
public async Task <IResponse> Process(IRequest request) { try { TankPositionQueRequest rq = request as TankPositionQueRequest; ActorId SessionId = new ActorId(rq.TankGameSessionId); await SessionId.Proxy <ITankGameSession>().NotifyPosition(new ActorId(rq.TankId), rq.x, rq.y, rq.z, rq.r); //Do que resolution TankPosistionResponse response = new TankPosistionResponse(rq.x, rq.y, rq.z, rq.r); response.TankId = rq.TankId; return(await Task.FromResult(response)); } catch (Exception E) { E.Log(); ErrorResponse errorresponse = new ErrorResponse(E.Message); return(errorresponse); } }