// Gets the singleton client for the specified network. private static IAdClient CreateAdClient(AdNetwork network) { var settings = EM_Settings.Advertising; switch (network) { case AdNetwork.AdColony: return(AdColonyClientImpl.CreateClient(settings)); case AdNetwork.AdMob: return(AdMobClientImpl.CreateClient(settings)); case AdNetwork.Chartboost: return(ChartboostClientImpl.CreateClient(settings)); case AdNetwork.Heyzap: return(HeyzapClientImpl.CreateClient(settings)); case AdNetwork.UnityAds: return(UnityAdsClientImpl.CreateClient(settings)); case AdNetwork.None: return(NoOpClientImpl.CreateClient()); default: throw new NotImplementedException("No client implemented for the network:" + network.ToString()); } }
/// <summary> /// Returns the singleton client. /// </summary> /// <returns>The client.</returns> public static ChartboostClientImpl CreateClient() { if (sInstance == null) { sInstance = new ChartboostClientImpl(); } return(sInstance); }