Beispiel #1
0
        protected virtual UniTaskVoid HandleClientNotReadyRequest(
            RequestHandlerData requestHandler,
            EmptyMessage request,
            RequestProceedResultDelegate <EmptyMessage> result)
        {
            AckResponseCode responseCode = AckResponseCode.Error;

            if (SetPlayerNotReady(requestHandler.ConnectionId, requestHandler.Reader))
            {
                responseCode = AckResponseCode.Success;
            }
            result.Invoke(responseCode, EmptyMessage.Value);
            return(default);
Beispiel #2
0
        protected virtual async UniTaskVoid HandleEnterGameRequest(
            RequestHandlerData requestHandler,
            EnterGameRequestMessage request,
            RequestProceedResultDelegate <EnterGameResponseMessage> result)
        {
            AckResponseCode          responseCode = AckResponseCode.Error;
            EnterGameResponseMessage response     = new EnterGameResponseMessage();

            if (request.packetVersion == PacketVersion() &&
                await DeserializeEnterGameData(requestHandler.ConnectionId, requestHandler.Reader))
            {
                responseCode             = AckResponseCode.Success;
                response.connectionId    = requestHandler.ConnectionId;
                response.serverSceneName = ServerSceneName;
            }
            result.Invoke(responseCode, response);
        }
Beispiel #3
0
 internal abstract void InvokeRequest(RequestHandlerData requestHandler, RequestProceedResultDelegate <INetSerializable> responseProceedResult);