예제 #1
0
 public void SendGamePlayersSnapshot(GamePlayersSnapshot snapshot)
 {
     try
     {
         log("is sent a snapshot of the players");
         callback.SendGamePlayerSnapshot(snapshot);
     }
     catch (Exception ex)
     {
         logError("sending snapshot of the players", ex);
     }
 }
예제 #2
0
        public void SendGamePlayerSnapshot(GamePlayersSnapshot snapshot)
        {
            lock (syncObject)
            {
                if (game != null)
                {
                    var players = snapshot.Players.Select(player => player.ToViewModel()).ToList();

                    Application.Current.Dispatcher.InvokeAsync(() => game.SendGamePlayerSnapshot(players));
                }
            }
        }
예제 #3
0
 public void SendGamePlayerSnapshot(GamePlayersSnapshot snapshot)
 {
     Console.WriteLine("Players changed.");
 }