Пример #1
0
        public override void PlayerDidChangeState(GKMatch match, string playerID, GKPlayerConnectionState state)
        {
            Player.LoadPlayersByIDs(new string[] { playerID }, delegate(Player[] players) {
                var rtMatch = NSObjectWrapper.GetWrapper(match.Uuid) as RealTimeMatch;
                if ((rtMatch != null) && (rtMatch.gkMatch != null) && (players.Length > 0))
                {
                    rtMatch._OnPlayerStateChanged(players[0], state);
                }

                match = null;
            });
        }
Пример #2
0
        public override void DidReceive(GKMatch match, NSData data, string playerID)
        {
            Player.LoadPlayersByIDs(new string[] { playerID }, delegate(Player[] players) {
                var rtMatch = NSObjectWrapper.GetWrapper(match.Uuid) as RealTimeMatch;
                if ((rtMatch != null) && (players.Length > 0))
                {
                    rtMatch._OnReceiveData(players[0], data);
                }

                match = null;
                data  = null;
            });
        }