Esempio n. 1
0
            public EnabledState(SimpleStateMachine <ServiceEvent> stateMachine, PurchasingProjectSettings provider)
                : base(k_StateNameEnabled, stateMachine, provider)
            {
                topicForNotifications          = Notification.Topic.PurchasingService;
                notLatestPackageInstalledInfo  = string.Format(k_NotLatestPackageInstalledInfo, k_PurchasingPackageName);
                packageInstallationHeadsup     = string.Format(k_PackageInstallationHeadsup, k_PurchasingPackageName);
                duplicateInstallWarning        = null;
                packageInstallationDialogTitle = string.Format(k_PackageInstallationDialogTitle, k_PurchasingPackageName);

                ModifyActionForEvent(ServiceEvent.Disabled, HandleDisabling);
            }
        public static SettingsProvider CreateServicesProvider()
        {
            SettingsProvider projectSettings = null;

            if (ShouldShowBuiltInProjectSettings(PurchasingService.instance))
            {
                projectSettings = new PurchasingProjectSettings(k_ProjectSettingsPath, SettingsScope.Project, new List <string>()
                {
                    L10n.Tr(k_KeywordPurchasing),
                    L10n.Tr(k_KeywordInApp),
                    L10n.Tr(k_KeywordPurchase),
                    L10n.Tr(k_KeywordRevenue),
                    L10n.Tr(k_KeywordPlatforms),
                    L10n.Tr(k_KeywordGooglePlay),
                    L10n.Tr(k_KeywordPublicKey)
                });
            }
            else if (ShouldShowFallbackProjectSettings(PurchasingService.instance))
            {
                projectSettings = new FallbackProjectSettings(PurchasingService.instance, SettingsScope.Project);
            }

            return(projectSettings);
        }
 public DisabledState(SimpleStateMachine <ServiceEvent> stateMachine, PurchasingProjectSettings provider)
     : base(k_StateNameDisabled, stateMachine, provider)
 {
     ModifyActionForEvent(ServiceEvent.Enabled, HandleEnabling);
 }