Пример #1
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();
    }
Пример #2
0
    //static RemoteSettingsValues()
    //{
    //    BackgroundSpeed = RemoteSettings.GetFloat("background-speed", 0.5f);

    //    RemoteSettings.Completed += HandleRemoteSettingsCompleted;
    //}

    private static void HandleRemoteSettingsCompleted(bool wasUpdatedFromServer, bool settingsChanged, int serverResponse)
    {
        backgroundSpeed   = RemoteSettings.GetFloat("background-speed", 0.5f);
        maxShields        = RemoteSettings.GetInt("max-shields", 3);
        shieldProbability = RemoteSettings.GetFloat("shield-probability", 0.1f);

        ValuesUpdated?.Invoke();
    }
Пример #3
0
    private static int AddStartPower()
    {
        int startPower = RemoteSettings.GetInt("StartPowerValue", 20);

        PlayerPrefsUtility.SetEncryptedInt("StartPowerValueUsed", 1);
        PlayerPrefsUtility.SetEncryptedInt("CurrentPower", startPower);
        return(startPower);
    }
Пример #4
0
        private static int ResolveSingleManifestVersion()
        {
            var version     = ContextManager.CurrentProject.As <IDownloadableProjectContext>().AssetBundleSingleManifestVersion;
            var projectName = ContextManager.CurrentProject.SceneNamePrefix.TrimEnd('_');
            var delimiter   = string.IsNullOrEmpty(projectName) ? string.Empty : "-";

            return(Math.Max(version, RemoteSettings.GetInt(string.Format(RemoteSettingKeyFormat, delimiter, projectName), version)));
        }
Пример #5
0
 void Start()
 {
     if (this.Actor == null)
     {
         throw new MissingComponentException("Missing actor");
     }
     _controller = InputManager.ActiveDevice;
     _blinkCost  = RemoteSettings.GetInt("BlinkEnergyCost", 5);
 }
Пример #6
0
 void Awake()
 {
     RemoteSettings.Completed += (b, b1, arg3) =>
     {
         levelTime          = RemoteSettings.GetInt("levelTime", defaultLevelTime);
         coinStartAmount    = RemoteSettings.GetInt("coinStartAmount", defaultCoinStartAmount);
         playerHealthAmount = RemoteSettings.GetFloat("playerHealthAmount", defaultPlayerHealthAmount);
     };
 }
 void Awake()
 {
     if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork || Application.internetReachability == NetworkReachability.ReachableViaCarrierDataNetwork)
     {
         RemoteSettings.Updated += () =>
         {
             GameManager.playerLives = RemoteSettings.GetInt("PlayersStartUpLives", GameManager.playerLives);
         };
     }
 }
    void Awake()
    {
        levelTime = defaultLevelTime;


        RemoteSettings.Completed += (b, b1, arg3) =>
        {
            levelTime   = RemoteSettings.GetInt("levelTime", defaultLevelTime);
            remaingTime = RemoteSettings.GetInt("remaingTime", defaultRemaingTime);
        };
    }
Пример #9
0
    private void CheckUpdates()
    {
        int latestVersionInt = RemoteSettings.GetInt("UpdateLatestVersionInt", Global.CurrentVersionInt);

        if (latestVersionInt > Global.CurrentVersionInt)
        {
            string latestVersion = RemoteSettings.GetString("UpdateLatestVersion", Global.CurrentVersion);
            string updateLink    = RemoteSettings.GetString("UpdateLink");
            ShowNewVersionIsAvailable(latestVersion, updateLink);
        }
    }
Пример #10
0
    private void CheckUpdateNotification(bool wasUpdatedFromServer, bool settingsChanged, int serverResponse)
    {
        Global.LatestVersionInt = RemoteSettings.GetInt("UpdateLatestVersionInt", Global.CurrentVersionInt);
        if (Global.LatestVersionInt > Global.CurrentVersionInt)
        {
            string latestVersion = RemoteSettings.GetString("UpdateLatestVersion", Global.CurrentVersion);
            string updateLink    = RemoteSettings.GetString("UpdateLink");
            ShowNewVersionIsAvailable(latestVersion, updateLink);
        }

        RemoteSettings.Completed -= CheckUpdateNotification;
    }
Пример #11
0
    private static void InitializeValues()
    {
        if (initialized)
        {
            return;
        }

        backgroundSpeed   = RemoteSettings.GetFloat("background-speed", 0.5f);
        maxShields        = RemoteSettings.GetInt("max-shields", 3);
        shieldProbability = RemoteSettings.GetFloat("shield-probability", 0.1f);

        RemoteSettings.Completed += HandleRemoteSettingsCompleted;
    }
 void Awake()
 {
     if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().buildIndex == 0)
     {
         if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork ||
             Application.internetReachability == NetworkReachability.ReachableViaCarrierDataNetwork)
         {
             RemoteSettings.Updated += () =>
             {
                 GameManager.playerLives = RemoteSettings.GetInt("PlayersStartUpLives", GameManager.playerLives);
             };
         }
     }
 }
Пример #13
0
        /// <summary>
        /// Make sure the ratio is most updated.
        /// </summary>
        private void EnsureRatio()
        {
            k_eventSender           = PlayerPrefs.GetInt("_360VideoHeatMap_EventSender", 0) == 0 ? true : false;
            k_currentSendEventRatio = PlayerPrefs.GetInt("_360VideoHeatMap_EventRatio", 10);

            int m_newSendEventRatio = RemoteSettings.GetInt("heatmaps_sample_rate", 10);

            // If the ratio has changed or the role has not been assigned before, reassign the user.
            if (!PlayerPrefs.HasKey("_360VideoHeatMap_EventSender") || k_currentSendEventRatio != m_newSendEventRatio)
            {
                k_currentSendEventRatio = m_newSendEventRatio;
                EnsureUserRole();
                PlayerPrefs.SetInt("_360VideoHeatMap_EventSender", k_eventSender == true ? 0 : 1);
                PlayerPrefs.SetInt("_360VideoHeatMap_EventRatio", k_currentSendEventRatio);
            }
        }
Пример #14
0
    private void HandleRemoteUpdate()
    {
        InitialWater = RemoteSettings.GetInt("initial_water", _defaultInitialWater);
        InitialFood  = RemoteSettings.GetInt("initial_food", _defaultInitialFood);
        InitialGold  = RemoteSettings.GetInt("initial_gold", _defaultInitialGold);

        WaterPerSecond = RemoteSettings.GetFloat("water_per_second", _defaultWaterPerSecond);
        FoodPerSecond  = RemoteSettings.GetFloat("food_per_second", _defaultFoodPerSecond);
        GoldPerSecond  = RemoteSettings.GetFloat("gold_per_second", _defaultGoldPerSecond);

        MaxWater = RemoteSettings.GetInt("max_water", _defaultMaxWater);
        MaxFood  = RemoteSettings.GetInt("max_food", _defaultMaxFood);
        MaxGold  = RemoteSettings.GetInt("max_gold", _defaultMaxGold);

        Initialized             = true;
        RemoteSettings.Updated -= HandleRemoteUpdate;
    }
Пример #15
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();
    }
Пример #16
0
 private void GetValuesFromRS()
 {
     startModifier = RemoteSettings.GetInt("StartModifier", 10);
 }
Пример #17
0
 private void HandleRemoteUpdate()
 {
     adFrequency = RemoteSettings.GetInt("AdFrequency", defaultAdFrequency);
     Debug.Log("Update AdFrequency " + adFrequency.ToString());
 }
 int ISettingReader.ReadInt(string key) =>
 RemoteSettings.GetInt(key);
Пример #19
0
    public static void AddPower()
    {
        int power = RemoteSettings.GetInt("PowerByAds", 20);

        PlayerPrefsUtility.SetEncryptedInt("CurrentPower", power + GetPower());
    }
        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);
                }
            }
        }
Пример #21
0
 private void RemoteSettingsUpdated()
 {
     _remoteValue.text = RemoteSettings.GetInt("testValue").ToString();
 }
Пример #22
0
 public int GetEnergyCost()
 {
     return(RemoteSettings.GetInt($"{GetTitle()}-EnergyCost", EnergyCost));
     // return EnergyCost;
 }
Пример #23
0
 public int GetInt(string key, int defaultValue = default)
 {
     return(RemoteSettings.GetInt(key, defaultValue));
 }
Пример #24
0
 public int GetInterstitialStartSecond()
 {
     return(RemoteSettings.GetInt(RemoteSettingKey.InterstitialStartSecond, DefaultValue.InterstitialStartSecond));
 }
Пример #25
0
 private void RefreshValueNotification()
 {
     Contains.time_to_push = RemoteSettings.GetInt("notification_time", 36000);
 }
Пример #26
0
    private void GetCustomABTestKeyValues()
    {
        // TODO: change this function to retrive needed values for AB tests

        variantFilmValue = RemoteSettings.GetInt("TotalFilmCount", DefaultFilmValue);
    }