Example #1
0
        void OnClientStartGame(NetworkMessage netMsg)
        {
            ServerStartGameMessage msg = netMsg.ReadMessage <ServerStartGameMessage>();

            Debug.Log("Received ServerStartGameMessage");
            GameLogicClient.game.prepareNewTurn(msg.startFirstTurnTimestamp);
            // passer l'écran d'attente des joueurs
        }
Example #2
0
        private void StartGame(GameLogicServer game, long startFirstTurnTimestamp)
        {
            ServerStartGameMessage msgOut = new ServerStartGameMessage();

            msgOut.startFirstTurnTimestamp = startFirstTurnTimestamp;
            foreach (Player p in game.players.Values)
            {
                p.user.connection.Send(ServerStartGameMessage.ID, msgOut);
            }
            Debug.Log("Server sent StartGame " + game.gameId);
        }