public MembershipService(ScheduledEventDateDefinition supported) { this.supported = supported; cs = Service.Get<CommerceService>(); if (IsPurchaseFunnelAvailable() && cs != null) { Service.Get<EventDispatcher>().AddListener<CommerceServiceEvents.PurchaseVerified>(PurchaseWasVerified); Service.Get<EventDispatcher>().AddListener<CommerceServiceErrors.PurchaseVerifiedError>(PurchaseWasVerifiedError); Service.Get<EventDispatcher>().AddListener<CommerceServiceEvents.UnexpectedPurchase>(UnexpectedPurchaseEvent); Service.Get<EventDispatcher>().AddListener<CommerceServiceEvents.ProductsLoaded>(ProducstWereLoadedVerified); Service.Get<EventDispatcher>().AddListener<CommerceServiceErrors.ProductsLoadedError>(ProducstWereLoadedError); Service.Get<EventDispatcher>().AddListener<CommerceServiceEvents.BillingEnabled>(BillingEnabled); Service.Get<EventDispatcher>().AddListener<CommerceServiceErrors.BillingEnabledError>(BillingEnabledError); Service.Get<EventDispatcher>().AddListener<CommerceServiceEvents.RestoreVerified>(RestoreWasVerified); Service.Get<EventDispatcher>().AddListener<CommerceServiceErrors.RestoreVerifiedError>(RestoreWasVerifiedError); Service.Get<EventDispatcher>().AddListener<NetworkErrors.InvalidSubscriptionError>(onInvalidSubscriptionError); Service.Get<EventDispatcher>().AddListener<IAPServiceErrors.MembershipGrantError>(onMembershipGrantError); if (cs.CommerceProcessor.IsBillingSupported()) { LoadProducts(); } } overrideSimCountryCode = new DevCacheableType<string>("cp.OverrideSimCountryCode", ""); overrideSimCarrierName = new DevCacheableType<string>("cp.OverrideSimCarrierName", ""); MembershipFunnelName = "membership_offer"; }
public MockGameSettings() { SfxEnabled = new CacheableType <bool>("cp.tests.SfxEnabled", defaultValue: true); MusicEnabled = new CacheableType <bool>("cp.tests.MusicEnabled", defaultValue: true); SfxVolume = new CacheableType <float>("cp.tests.SfxVolume", 1f); MusicVolume = new CacheableType <float>("cp.tests.MusicVolume", 1f); SavedLanguage = new CacheableType <string>("cp.tests.SavedLanguage", "en_US"); DevelopmentEnvironment = new DevCacheableType <Disney.Kelowna.Common.Environment.Environment>("cp.tests.DevelopmentEnvironment", Disney.Kelowna.Common.Environment.Environment.QA); }
public MixLoginCreateService() { keychainData = Service.Get<IKeychain>(); sessionStarter = new SessionStarter(); coroutineManager = new MixCoroutineManager(); logger = new MixLogger(); localizer = Service.Get<Localizer>(); Localizer obj = localizer; obj.TokensUpdated = (Localizer.TokensUpdatedDelegate)Delegate.Combine(obj.TokensUpdated, new Localizer.TokensUpdatedDelegate(onLanguageChanged)); overrideCountryCode = new DevCacheableType<string>("mix.OverrideCountryCode", ""); spoofedGeoIp = new DevCacheableType<string>("mix.SpoofedGeoIP", null); Service.Get<ICommonGameSettings>().RegisterSetting(overrideCountryCode, canBeReset: true); Service.Get<ICommonGameSettings>().RegisterSetting(spoofedGeoIp, canBeReset: true); }
public GameSettings() { string[] commandLineArgs = Environment.GetCommandLineArgs(); if (commandLineArgs != null && commandLineArgs.Contains("-clear-prefs")) { PlayerPrefs.DeleteAll(); } NumDaysPlayed = new CacheableType <int>("cp.NumDaysPlayed", 0); LastDayPlayed = new CacheableType <string>("cp.LastDayPlayed", string.Empty); SfxEnabled = new CacheableType <bool>("cp.SfxEnabled", defaultValue: true); SfxVolume = new CacheableType <float>("cp.SfxVolume", 1f); MusicEnabled = new CacheableType <bool>("cp.MusicEnabled", defaultValue: true); MusicVolume = new CacheableType <float>("cp.MusicVolume", 1f); SavedLanguage = new CacheableType <Language>("cp.SavedLanguage", Language.none); LastZone = new CacheableType <string>("cp.LastZone", ""); KeyboardHeight = new CacheableType <float>("cp.KeyboardHeight", 0.38f); EnablePushNotifications = new CacheableType <bool>("cp.EnablePushNotifications", defaultValue: true); SkipFTUE = new DevCacheableType <bool>("cp.SkipFTUE", defaultValue: false); BypassCaptcha = new DevCacheableType <bool>("cp.BypassCaptcha", defaultValue: false); FirstLoadOfApp = new CacheableType <bool>("cp.FirstLoadOfApp", defaultValue: true); FirstSession = FirstLoadOfApp; FirstLoadOfApp.SetValue(value: false); SeenInAppPurchaseDisclaimerPrompt = new CacheableType <bool>("cp.SeenInAppPurchaseDisclaimerPrompt", defaultValue: false); EnableAnalyticsLogging = new DevCacheableType <bool>("cp.EnableAnalyticsLogging", defaultValue: true); GameServerHost = new CacheableType <string>("cp.network.GameServerHost", ""); CPAPIServicehost = new CacheableType <string>("cp.network.CPAPIServicehost", ""); GuestControllerHostUrl = new CacheableType <string>("cp.network.GuestControllerHostUrl", ""); GuestControllerCDNUrl = new CacheableType <string>("cp.network.GuestControllerCDNUrl", ""); MixAPIHostUrl = new CacheableType <string>("cp.network.MixAPIHostUrl", ""); CDN = new CacheableType <string>("cp.network.CDN", ""); CPWebsiteAPIServicehost = new CacheableType <string>("cp.network.CPWebsiteAPIServicehost", ""); AutoLogin = new DevCacheableType <bool>("cp.AutoLogin", defaultValue: true); resetableGenericSettings = new HashSet <ICachableType>(); if (DateTime.UtcNow > new DateTime(2018, 12, 21)) { OfflineMode = true; } }