private static void ReportRoomSetupProgress(IRealTimeMultiplayerListener listener, GKMatch match, NSError error, bool programmaticMatchmaking = false) { if (listener == null) { return; } // Setup failed. if (match == null || error != null) { listener.OnRoomConnected(false); return; } // Setup succeeded or is progressing. float progress; bool completed = IsRoomSetupComplete(match, out progress); // On progress. listener.OnRoomSetupProgress(progress); // Connected. if (completed) { // Programmatic matchmaking has finished. if (programmaticMatchmaking) { GKMatchmaker.SharedMatchmaker().FinishMatchmakingForMatch(match); } listener.OnRoomConnected(true); } }
public void OnRoomConnected(bool success) { listener.OnRoomConnected(success); }