コード例 #1
0
 public EnabledState(SimpleStateMachine <AdsEvent> simpleStateMachine, AdsProjectSettings provider)
     : base(k_StateNameEnabled, simpleStateMachine, provider)
 {
     ModifyActionForEvent(AdsEvent.Disabling, HandleUnbinding);
     // Related protected variables
     topicForNotifications          = Notification.Topic.AdsService;
     notLatestPackageInstalledInfo  = string.Format(k_NotLatestPackageInstalledInfo, k_AdsPackageName);
     packageInstallationHeadsup     = string.Format(k_PackageInstallationHeadsup, k_AdsPackageName);;
     duplicateInstallWarning        = k_DuplicateInstallWarning;
     packageInstallationDialogTitle = string.Format(k_PackageInstallationDialogTitle, k_AdsPackageName);
 }
コード例 #2
0
 public AdsProjectSettings(string path, SettingsScope scopes, IEnumerable <string> keywords = null)
     : base(path, scopes, k_ServiceName, keywords)
 {
     m_StateMachine = new SimpleStateMachine <AdsEvent>();
     m_StateMachine.AddEvent(AdsEvent.Enabling);
     m_StateMachine.AddEvent(AdsEvent.Disabling);
     m_EnabledState  = new EnabledState(m_StateMachine, this);
     m_DisabledState = new DisabledState(m_StateMachine, this);
     m_StateMachine.AddState(m_EnabledState);
     m_StateMachine.AddState(m_DisabledState);
 }
コード例 #3
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);
            }
コード例 #4
0
        public AdsProjectSettings(string path, SettingsScope scopes, IEnumerable <string> keywords = null)
            : base(path, scopes, k_ServiceName, keywords)
        {
            m_StateMachine = new SimpleStateMachine <AdsEvent>();
            m_StateMachine.AddEvent(AdsEvent.Enabling);
            m_StateMachine.AddEvent(AdsEvent.Disabling);
            m_EnabledState  = new EnabledState(m_StateMachine, this);
            m_DisabledState = new DisabledState(m_StateMachine, this);
            m_AppleGameId   = AdvertisementSettings.GetGameId(RuntimePlatform.IPhonePlayer);
            m_AndroidGameId = AdvertisementSettings.GetGameId(RuntimePlatform.Android);

            m_StateMachine.AddState(m_EnabledState);
            m_StateMachine.AddState(m_DisabledState);
        }
コード例 #5
0
        public AnalyticsProjectSettings(string path, SettingsScope scopes, IEnumerable <string> keywords = null)
            : base(path, scopes, k_ServiceName, keywords)
        {
            m_StateMachine = new SimpleStateMachine <ServiceEvent>();

            m_StateMachine.AddEvent(ServiceEvent.Disabled);
            m_StateMachine.AddEvent(ServiceEvent.Integrating);
            m_StateMachine.AddEvent(ServiceEvent.Enabled);

            m_DisabledState    = new DisabledState(m_StateMachine, this);
            m_IntegrationState = new IntegrationState(m_StateMachine, this);
            m_EnabledState     = new EnabledState(m_StateMachine, this);

            m_StateMachine.AddState(m_DisabledState);
            m_StateMachine.AddState(m_IntegrationState);
            m_StateMachine.AddState(m_EnabledState);

            m_ValidationPoller = new AnalyticsValidationPoller();
        }
コード例 #6
0
            public EnabledState(SimpleStateMachine <ServiceEvent> stateMachine, AnalyticsProjectSettings provider)
                : base(k_StateNameEnabled, stateMachine, provider)
            {
                topicForNotifications          = Notification.Topic.AnalyticsService;
                notLatestPackageInstalledInfo  = string.Format(k_NotLatestPackageInstalledInfo, k_AnalyticsPackageName);
                packageInstallationHeadsup     = string.Format(k_PackageInstallationHeadsup, k_AnalyticsPackageName);
                duplicateInstallWarning        = null;
                packageInstallationDialogTitle = string.Format(k_PackageInstallationDialogTitle, k_AnalyticsPackageName);

                ModifyActionForEvent(ServiceEvent.Disabled, HandleDisabling);
                ModifyActionForEvent(ServiceEvent.Integrating, HandleIntegrating);

                m_AdditionalEvents = new Dictionary <string, AdditionalEvent>()
                {
                    [k_CustomKey] = new AdditionalEvent()
                    {
                        title = k_CustomTitle, description = k_CustomDesc, learnUrl = AnalyticsConfiguration.instance.customLearnUrl
                    },
                    [k_MonetizationTitleAndKey] = new AdditionalEvent()
                    {
                        title = k_MonetizationTitleAndKey, description = k_MonetizationDesc, learnUrl = AnalyticsConfiguration.instance.monetizationLearnUrl
                    },
                };
            }
コード例 #7
0
 public DisabledState(SimpleStateMachine <AdsEvent> simpleStateMachine, AdsProjectSettings provider)
     : base(k_StateNameDisabled, simpleStateMachine, provider)
 {
     ModifyActionForEvent(AdsEvent.Enabling, HandleBinding);
 }
コード例 #8
0
 public BaseState(string name, SimpleStateMachine <AdsEvent> simpleStateMachine, AdsProjectSettings provider)
     : base(name, simpleStateMachine, provider)
 {
 }
コード例 #9
0
 public EnabledState(SimpleStateMachine <CloudBuildEvent> simpleStateMachine, CloudBuildProjectSettings provider)
     : base(k_StateNameEnabled, simpleStateMachine)
 {
     m_Provider = provider;
     ModifyActionForEvent(CloudBuildEvent.Disabling, HandleUnbinding);
 }
コード例 #10
0
 public IntegrationState(SimpleStateMachine <ServiceEvent> stateMachine, AnalyticsProjectSettings provider)
     : base(k_StateNameIntegration, stateMachine, provider)
 {
     ModifyActionForEvent(ServiceEvent.Disabled, HandleDisabling);
     ModifyActionForEvent(ServiceEvent.Enabled, HandleEnabling);
 }
コード例 #11
0
 protected BaseAnalyticsState(string stateName, SimpleStateMachine <ServiceEvent> stateMachine, AnalyticsProjectSettings provider)
     : base(stateName, stateMachine, provider)
 {
 }
コード例 #12
0
 public State(string name, SimpleStateMachine <T> simpleStateMachine)
 {
     this.name    = name;
     stateMachine = simpleStateMachine;
 }
コード例 #13
0
 public DisabledState(SimpleStateMachine <ServiceEvent> stateMachine, PurchasingProjectSettings provider)
     : base(k_StateNameDisabled, stateMachine, provider)
 {
     ModifyActionForEvent(ServiceEvent.Enabled, HandleEnabling);
 }
コード例 #14
0
 protected BasePurchasingState(string stateName, SimpleStateMachine <ServiceEvent> stateMachine, PurchasingProjectSettings provider)
     : base(stateName, stateMachine, provider)
 {
 }
コード例 #15
0
 public DisabledState(SimpleStateMachine <CloudDiagCrashEvent> simpleStateMachine, CloudDiagProjectSettings provider)
     : base(k_StateNameDisabled, simpleStateMachine)
 {
     m_Provider = provider;
     ModifyActionForEvent(CloudDiagCrashEvent.Enabling, HandleBinding);
 }