Exemple #1
0
 public void RemoveUsername(string username)
 {
     if (Usernames.Remove(username))
     {
         if (CurrentUsername == username)
         {
             CurrentUsername = string.Empty;
         }
         CacheableType <string> accountDataCache = getAccountDataCache(username);
         accountDataCache.SetValue(string.Empty);
         KeyChainCacheableString credentialDataCache = getCredentialDataCache(username);
         credentialDataCache.SetValue(string.Empty);
         saveUsernames();
     }
 }
 public GameSettings()
 {
     string[] commandLineArgs = Environment.GetCommandLineArgs();
     if (commandLineArgs != null && commandLineArgs.Contains("-clear-prefs"))
     {
         PlayerPrefs.DeleteAll();
     }
     NumDaysPlayed           = new CacheableType <int>("cp.NumDaysPlayed", 0);
     LastDayPlayed           = new CacheableType <string>("cp.LastDayPlayed", string.Empty);
     SfxEnabled              = new CacheableType <bool>("cp.SfxEnabled", defaultValue: true);
     SfxVolume               = new CacheableType <float>("cp.SfxVolume", 1f);
     MusicEnabled            = new CacheableType <bool>("cp.MusicEnabled", defaultValue: true);
     MusicVolume             = new CacheableType <float>("cp.MusicVolume", 1f);
     SavedLanguage           = new CacheableType <Language>("cp.SavedLanguage", Language.none);
     LastZone                = new CacheableType <string>("cp.LastZone", "");
     KeyboardHeight          = new CacheableType <float>("cp.KeyboardHeight", 0.38f);
     EnablePushNotifications = new CacheableType <bool>("cp.EnablePushNotifications", defaultValue: true);
     SkipFTUE                = new DevCacheableType <bool>("cp.SkipFTUE", defaultValue: false);
     BypassCaptcha           = new DevCacheableType <bool>("cp.BypassCaptcha", defaultValue: false);
     FirstLoadOfApp          = new CacheableType <bool>("cp.FirstLoadOfApp", defaultValue: true);
     FirstSession            = FirstLoadOfApp;
     FirstLoadOfApp.SetValue(value: false);
     SeenInAppPurchaseDisclaimerPrompt = new CacheableType <bool>("cp.SeenInAppPurchaseDisclaimerPrompt", defaultValue: false);
     EnableAnalyticsLogging            = new DevCacheableType <bool>("cp.EnableAnalyticsLogging", defaultValue: true);
     GameServerHost         = new CacheableType <string>("cp.network.GameServerHost", "");
     CPAPIServicehost       = new CacheableType <string>("cp.network.CPAPIServicehost", "");
     GuestControllerHostUrl = new CacheableType <string>("cp.network.GuestControllerHostUrl", "");
     GuestControllerCDNUrl  = new CacheableType <string>("cp.network.GuestControllerCDNUrl", "");
     MixAPIHostUrl          = new CacheableType <string>("cp.network.MixAPIHostUrl", "");
     CDN = new CacheableType <string>("cp.network.CDN", "");
     CPWebsiteAPIServicehost = new CacheableType <string>("cp.network.CPWebsiteAPIServicehost", "");
     AutoLogin = new DevCacheableType <bool>("cp.AutoLogin", defaultValue: true);
     resetableGenericSettings = new HashSet <ICachableType>();
     if (DateTime.UtcNow > new DateTime(2018, 12, 21))
     {
         OfflineMode = true;
     }
 }
 public static void DisableTweaker()
 {
     enableTweaker.SetValue(value: false);
 }