Beispiel #1
0
        public AddIAPProductValueResult AddProduct(string identifier, HMSIAPProductType type)
        {
            identifier = identifier.PreprocessValue();
            var canAdd = CanAdd(identifier);

            if (canAdd == AddIAPProductValueResult.OK)
            {
                _productList.Add(new HMSIAPProductEntry(identifier, type));
                _settings.Set(identifier, type.ToString());
                RequireRefresh();
            }

            return(canAdd);
        }
        public AddLeaderboardResult AddLeaderboard(string leaderboardName, string id)
        {
            id = id.PreprocessValue();
            leaderboardName = leaderboardName.RemoveSpecialCharacters();

            var canAdd = CanAdd(id);

            if (canAdd == AddLeaderboardResult.OK)
            {
                _leaderboardList.Add(new HMSLeaderboardEntry(id, leaderboardName));
                _settings.Set(id, leaderboardName);
                RequireRefresh();
            }

            return(canAdd);
        }
Beispiel #3
0
        public AddAchievementResult AddAchievement(string achievementName, string id)
        {
            id = id.PreprocessValue();
            achievementName = achievementName.RemoveSpecialCharacters();

            var canAdd = CanAdd(id);

            if (canAdd == AddAchievementResult.OK)
            {
                _achievementList.Add(new HMSAchievementEntry(id, achievementName));
                _settings.Set(id, achievementName);
                RequireRefresh();
            }

            return(canAdd);
        }
        public AddDefaultValueResult AddDefaultValue(string keyName, string keyValue)
        {
            keyName  = PreprocessValue(keyName);
            keyValue = PreprocessValue(keyValue);

            var canAdd = CanAdd(keyName);

            if (canAdd == AddDefaultValueResult.OK)
            {
                _defaultValues.Add(new DefaultValue(keyName, keyValue));
                _settings.Set(keyName, keyValue);
                RequireRefresh();
            }

            return(canAdd);
        }
 private void OnBannerRefreshIntervalSaveButtonClick()
 {
     _settings.Set(HMSAdsKitSettings.BannerRefreshInterval, _bannerAdsRefreshField.GetCurrentText());
 }