Пример #1
0
    private void CheckUpdate()
    {
        long version         = RemoteSettings.GetLong("update_version", 0);
        long current_version = 0;

        var last_version_update = current_version;

        long.TryParse(Contains.LastVersionUpdate, out last_version_update);

        var is_force_update = RemoteSettings.GetBool("update_skip");

        if (long.TryParse(Version.bundleVersion, out current_version))
        {
            if (version > current_version && version > last_version_update)
            {
                if (MessageManager.InstanceAwake() != null)
                {
                    var message = string.Empty;

                    #if UNITY_ANDROID
                    message = ApplicationLanguage.Text_description_update_android;
                    #elif UNITY_IOS
                    message = ApplicationLanguage.Text_description_update_ios;
                    #endif

                    MessageManager.Instance.ShowForceMessage(message, is_force_update, () =>
                    {
                        MessageManager.Instance.DisableForceHud();
                        ApplicationManager.Instance.OpenUrlStore();
                    }, () => { Contains.LastVersionUpdate = version.ToString(); });
                }
            }
        }
    }
Пример #2
0
    private void HandleRemoteUpdate()
    {
        display_home_ads         = RemoteSettings.GetBool("display_home_ads", true);
        display_banner_ads       = RemoteSettings.GetBool("display_banner_ads", true);
        display_interstitial_ads = RemoteSettings.GetBool("display_interstitial_ads", true);
        display_video_ads        = RemoteSettings.GetBool("display_video_ads", true);

        admob_banner_id       = RemoteSettings.GetString("admob_banner_id", admob_banner_id);
        admob_interstitial_id = RemoteSettings.GetString("admob_interstitial_id", admob_interstitial_id);

        fan_banner_id       = RemoteSettings.GetString("fan_banner_id", fan_banner_id);
        fan_interstitial_id = RemoteSettings.GetString("fan_interstitial_id", fan_interstitial_id);

        delay_interstital_time = RemoteSettings.GetFloat("delay_interstital_time", delay_interstital_time);

        admob_banner_ratio = RemoteSettings.GetInt("admob_banner_ratio", admob_banner_ratio);
        fan_banner_ratio   = RemoteSettings.GetInt("fan_banner_ratio", fan_banner_ratio);

        admob_interstitial_ratio = RemoteSettings.GetInt("admob_interstitial_ratio", admob_interstitial_ratio);
        fan_interstitial_ratio   = RemoteSettings.GetInt("fan_interstitial_ratio", fan_interstitial_ratio);

        //ball_bonus = RemoteSettings.GetInt("ball_bonus", 0);
        moves_reduction = RemoteSettings.GetInt("moves_reduction", moves_reduction);

        ToolsExtend.NotificationSystem.instance.Init();
    }
Пример #3
0
 // Token: 0x060007E2 RID: 2018 RVA: 0x00049060 File Offset: 0x00047260
 private void method_55()
 {
     this.bool_14  = (GlobalVariables.instance.float_0 < RemoteSettings.GetFloat("latestTestBuild", 0f));
     this.bool_13  = RemoteSettings.GetBool("isSupported", true);
     this.string_2 = RemoteSettings.GetString("notSupportedTitle_" + ((GlobalVariables.instance.gclass5_42.CurrentValue == 4) ? "Portuguese" : GlobalVariables.instance.languages[GlobalVariables.instance.gclass5_42.CurrentValue]), "This is a placeholder");
     this.string_1 = RemoteSettings.GetString("notSupportedBody_" + ((GlobalVariables.instance.gclass5_42.CurrentValue == 4) ? "Portuguese" : GlobalVariables.instance.languages[GlobalVariables.instance.gclass5_42.CurrentValue]), "This is a placeholder");
     this.string_3 = RemoteSettings.GetString("notSupportedLink", "This is a placeholder");
 }
Пример #4
0
    private void CheckRemoteSettings()
    {
        bool showNeyYearTree = RemoteSettings.GetBool("ShowNewYearTree", false);

        if (showNeyYearTree)
        {
            GameObject.Find("SceneHolder/Board").transform.Find("NewYearTree").gameObject.SetActive(true);
            GameObject.Find("SceneHolder/Board/CombatDiceHolder").transform.localPosition = new Vector3(73, 0, 0);
            GameObject.Find("SceneHolder/Board/CheckDiceHolder").transform.localPosition  = new Vector3(85, 0, 0);
        }
    }
Пример #5
0
        private void HandleRemoteSettingsUpdated()
        {
            m_remoteSettings.Add(SHOW_MENU_OPTIONS_ID,
                                 RemoteSettings.GetBool(SHOW_MENU_OPTIONS_ID));



            m_remoteSettings.Add(LOCALIZATION_URL,
                                 RemoteSettings.GetString(LOCALIZATION_URL));

            RegisterService();
            OnRemoteSettingsUpdated?.Invoke();
        }
Пример #6
0
        public static bool IsLowEndDevice()
        {
#if DEBUG
            if (emulateLowEndDevice)
            {
                return(true);
            }
#endif

            if (isLowEndDeviceChecked)
            {
                return(isLowEndDevice);
            }

            isLowEndDevice        = RemoteSettings.GetBool("IsLowEndDevice", GetIsLowEndDevice());
            isLowEndDeviceChecked = true;
            return(isLowEndDevice);
        }
Пример #7
0
    private void HandleRemoteUpdate()
    {
        bubble_persistence  = RemoteSettings.GetFloat("bubble_persistence", bubble_defaultPersistence);
        bubble_contrast     = RemoteSettings.GetFloat("bubble_contrast", bubble_defaultContrast);
        bubble_gameTime     = RemoteSettings.GetFloat("bubble_gameTime", bubble_defaultGameTime);
        bubble_frequency    = RemoteSettings.GetFloat("bubble_frequency", bubble_defaultFrequency);
        bubble_topSx        = RemoteSettings.GetBool("bubble_spawnAreaTopSxEnabled", defaultBool);
        bubble_topMiddle    = RemoteSettings.GetBool("bubble_spawnAreaTopMidEnabled", defaultBool);
        bubble_topDx        = RemoteSettings.GetBool("bubble_spawnAreaTopDxEnabled", defaultBool);
        bubble_bottomSx     = RemoteSettings.GetBool("bubble_spawnAreaBotSxEnabled", defaultBool);
        bubble_bottomMiddle = RemoteSettings.GetBool("bubble_spawnAreaBotMidEnabled", defaultBool);
        bubble_bottomDx     = RemoteSettings.GetBool("bubble_spawnAreaBotDxEnabled", defaultBool);

        bubble_leftHand  = RemoteSettings.GetBool("bubble_limbsEnabledLeftHand", defaultBool);
        bubble_rightHand = RemoteSettings.GetBool("bubble_limbsEnabledRightHand", defaultBool);
        bubble_leftFoot  = RemoteSettings.GetBool("bubble_limbsEnabledLeftFoot", defaultBool);
        bubble_rightFoot = RemoteSettings.GetBool("bubble_limbsEnabledRightFoot", defaultBool);

        keepAttention_leftBot                      = RemoteSettings.GetBool("keepAttention_spawnAreaLeftBotEnabled", defaultBool);
        keepAttention_leftTop                      = RemoteSettings.GetBool("keepAttention_spawnAreaLeftTopEnabled", defaultBool);
        keepAttention_topLeft                      = RemoteSettings.GetBool("keepAttention_spawnAreaTopLeftEnabled", defaultBool);
        keepAttention_topRight                     = RemoteSettings.GetBool("keepAttention_spawnAreaTopRightEnabled", defaultBool);
        keepAttention_rightTop                     = RemoteSettings.GetBool("keepAttention_spawnAreaRightTopEnabled", defaultBool);
        keepAttention_rightBot                     = RemoteSettings.GetBool("keepAttention_spawnAreaRightBotEnabled", defaultBool);
        keepAttention_gameTime                     = RemoteSettings.GetFloat("keepAttention_gameTime", keepAttention_defaultGameTime);
        keepAttention_speedGoodTarget              = RemoteSettings.GetFloat("keepAttention_speedGoodTarget", keepAttention_defaultTargetSpeed);
        keepAttention_speedBadTarget               = RemoteSettings.GetFloat("keepAttention_speedBadTarget", keepAttention_defaultTargetSpeed);
        keepAttention_frequencyGoodTarget          = RemoteSettings.GetFloat("keepAttention_frequencyGoodTarget", keepAttention_defaultFrequency);
        keepAttention_frequencyBadTarget           = RemoteSettings.GetFloat("keepAttention_frequencyBadTarget", keepAttention_defaultFrequency);
        keepAttention_contrastGoodTarget           = RemoteSettings.GetFloat("keepAttention_contrastGoodTarget", keepAttention_defaultContrast);
        keepAttention_contrastBadTarget            = RemoteSettings.GetFloat("keepAttention_contrastBadTarget", keepAttention_defaultContrast);
        keepAttention_diagonalTrajectoryPercentage = RemoteSettings.GetFloat("keepAttention_diagonalTrajectoryPercentage", keepAttention_defaultDiagonalTrajectoryPercentage);
        keepAttention_targetSpawnPercentage        = RemoteSettings.GetFloat("keepAttention_targetSpawnPercentage", keepAttention_defaultTargetSpawnPercentage);
        keepAttention_life = RemoteSettings.GetInt("keepAttention_life", keepAttention_defaultLife);

        shape_gameTime          = RemoteSettings.GetFloat("shape_gameTime", shape_defaultGameTime);
        shape_winningPercentage = RemoteSettings.GetFloat("shape_winningPercentage", shape_defaultWinningPercentage);

        SetSpawnListBubble();
        SetSpawnListKeepAttention();
    }
Пример #8
0
    private void RemoteSettings_Updated()
    {
        GameSpeed              = RemoteSettings.GetFloat("GameSpeed", GameSpeed);
        PlayerSpeed            = RemoteSettings.GetFloat("PlayerSpeed", PlayerSpeed);
        EnemySpeed             = RemoteSettings.GetFloat("EnemySpeed", EnemySpeed);
        TimeToSwitchHatchState = RemoteSettings.GetFloat("TimeToSwitchHatchState", TimeToSwitchHatchState);
        MainCameraSize         = RemoteSettings.GetFloat("MainCameraSize", MainCameraSize);

        IsCanChangeDirectionInMovement = RemoteSettings.GetBool("IsCanChangeDirectionInMovement", IsCanChangeDirectionInMovement);


        var gamesRemoteSettings = new GamesRemoteSettings()
        {
            EnemySpeed = EnemySpeed,
            GameSpeed  = GameSpeed,
            IsCanChangeDirectionInMovement = IsCanChangeDirectionInMovement,
            MainCameraSize         = MainCameraSize,
            PlayerSpeed            = PlayerSpeed,
            TimeToSwitchHatchState = TimeToSwitchHatchState
        };

        SavingGlobalSettings.Settings.RemoteSettings = gamesRemoteSettings;
        SavingGlobalSettings.SaveGameData();
    }
        public void UpdateRemoteSettings()
        {
            Type myType = this.GetType();

            FieldInfo[] fields = myType.GetFields(
                BindingFlags.NonPublic | BindingFlags.Public |
                BindingFlags.Instance);

            foreach (var field in fields)
            {
                Entry entry = GetEntryFromField(this, field);


                if (RemoteSettings.HasKey(entry.key))
                {
                    bool valueChanged = false;

                    //Type doesn't work with a switch, so let's do it this way
                    if (entry.type == "bool")
                    {
                        bool value = RemoteSettings.GetBool(entry.key);

                        if (value != (bool)field.GetValue(this))
                        {
                            valueChanged = true;
                        }

                        field.SetValue(this, value);
                    }
                    else if (entry.type == "float")
                    {
                        float value = RemoteSettings.GetFloat(entry.key);

                        if (value != (float)field.GetValue(this))
                        {
                            valueChanged = true;
                        }

                        field.SetValue(this, value);
                    }
                    else if (entry.type == "int")
                    {
                        int value = RemoteSettings.GetInt(entry.key);

                        if (value != (int)field.GetValue(this))
                        {
                            valueChanged = true;
                        }

                        field.SetValue(this, value);
                    }
                    else if (entry.type == "string")
                    {
                        string value = RemoteSettings.GetString(entry.key);

                        if (value != (string)field.GetValue(this))
                        {
                            valueChanged = true;
                        }

                        field.SetValue(this, value);
                    }

                    if (valueChanged)
                    {
                        Debug.LogFormat("<color=cyan>Remote Settings</color> # Update field {0} of {1}.", entry.key, this.name);
                    }
                }

                else
                {
                    Debug.LogFormat("<color=cyan>Remote Settings</color> # <color=red>No key</color> for field {0} of {1}.", entry.key, this.name);
                }
            }
        }
 private static void UpdateRemoteSettings()
 {
     ShowAds = RemoteSettings.GetBool(ShowAdsKey);
 }
 private static void LoadRemoteSettings()
 {
     ShowAds = RemoteSettings.GetBool(ShowAdsKey);
     RemoteSettings.Updated += UpdateRemoteSettings;
 }
Пример #12
0
 public bool GetBool(string key, bool defaultValue = default)
 {
     return(RemoteSettings.GetBool(key, defaultValue));
 }