Ejemplo n.º 1
0
        private void HandleGameListMsg(InsightMessage _insightMsg)
        {
            // var message = (GameListMsg) insightMsg.message;

            Debug.Log("[GameMasterManager] - Received player requesting game list");

            var gamesListMsg = new GameListMsg();

            gamesListMsg.Load(registeredGameServers);

            var responseToSend = new InsightNetworkMessage(gamesListMsg)
            {
                callbackId = _insightMsg.callbackId,
                status     = CallbackStatus.Success
            };

            if (_insightMsg is InsightNetworkMessage netMsg)
            {
                server.NetworkReply(netMsg.connectionId, responseToSend);
            }
            else
            {
                server.InternalReply(responseToSend);
            }
        }
Ejemplo n.º 2
0
        void HandleGameListMsg(InsightNetworkMessage netMsg)
        {
            GameListMsg message = netMsg.ReadMessage <GameListMsg>();

            if (client.logNetworkMessages)
            {
                Debug.Log("[InsightClient] - Received Games List");
            }
            ;

            gamesList.Clear();

            foreach (GameContainer game in message.gamesArray)
            {
                Debug.Log(game.SceneName);

                gamesList.Add(new GameContainer()
                {
                    UniqueId       = game.UniqueId,
                    SceneName      = game.SceneName,
                    CurrentPlayers = game.CurrentPlayers,
                    MaxPlayers     = game.MaxPlayers,
                    MinPlayers     = game.MinPlayers
                });
            }
        }
Ejemplo n.º 3
0
        void HandleGameListMsg(InsightNetworkMessage netMsg)
        {
            Debug.Log("[MatchMaking] - Player Requesting Match list");

            GameListMsg gamesListMsg = new GameListMsg();

            gamesListMsg.Load(registeredGameServers);

            netMsg.Reply(gamesListMsg);
        }
Ejemplo n.º 4
0
        void HandleGameListMsg(InsightNetworkMessage netMsg)
        {
            if (server.logNetworkMessages)
            {
                UnityEngine.Debug.Log("[MatchMaking] - Player Requesting Match list");
            }

            GameListMsg gamesListMsg = new GameListMsg();

            gamesListMsg.Load(registeredGameServers);

            netMsg.Reply((short)MsgId.GameList, gamesListMsg);
        }