private static void HandleHandicap(NetworkMessage msg) { MsgHandicap update = msg as MsgHandicap; WriteLine("Handicap update"); foreach (var u in update.Handicaps) { WriteLine(String.Format("\tID:{0} ({1})", u.Key, u.Value)); } }
public void HandleHandicap(NetworkMessage msg) { MsgHandicap update = msg as MsgHandicap; foreach (var u in update.Handicaps) { Player p = GetPlayerByID(u.Key); if (p != null) { p.Handicap = u.Value; if (PlayerInfoUpdated != null) { PlayerInfoUpdated.Invoke(this, p); } } } }