public List <DropData> GetDiamondBoxNormal() { bool flag = true; object[] args = new object[] { LocalSave.Instance.GetServerUserID() }; string key = Utils.FormatString("GetDiamondBox1_FirstGet_{0}", args); if (PlayerPrefsEncrypt.HasKey(key)) { flag = false; } else { PlayerPrefsEncrypt.SetInt(key, 0); } int num = LocalSave.Instance.Stage_GetStage(); Box_SilverNormalBox beanById = LocalModelManager.Instance.Box_SilverNormalBox.GetBeanById(num); List <DropData> dropList = LocalModelManager.Instance.Drop_Drop.GetDropList(beanById.SingleDrop); for (int i = LocalModelManager.Instance.Equip_equip.GetBeanById(dropList[0].id).Position; flag && (i == 1); i = LocalModelManager.Instance.Equip_equip.GetBeanById(dropList[0].id).Position) { dropList = LocalModelManager.Instance.Drop_Drop.GetDropList(beanById.SingleDrop); } return(dropList); }
private bool CheckNotice() { DateTime time = new DateTime(SdkManager.get_first_setup_time()); DateTime time2 = new DateTime(DateTime.Now.ToUniversalTime().Ticks); TimeSpan span = (TimeSpan)(time2 - time); if ((span.TotalDays >= 2.0) && !PlayerPrefsEncrypt.HasKey("first_test_notice")) { PlayerPrefsEncrypt.SetInt("first_test_notice", 0); WindowUI.ShowWindow(WindowID.WindowID_TestNotice); return(true); } return(false); }
protected override void InitializeView() { base.InitializeView(); if (!PlayerPrefsEncrypt.HasKey("first_cg")) { PlayerPrefsEncrypt.SetInt("first_cg", 0); GameLogic.Hold.Sound.StopBackgroundMusic(); WindowUI.ShowWindow(WindowID.WindowID_VideoPlay); } else { LocalSave.Instance.DoLogin_Start(null); WindowUI.ShowWindow(WindowID.WindowID_Login); } }
public void ChangeLanguage(string language) { Dictionary <SystemLanguage, string> .Enumerator enumerator = m_LanguageIDMap.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <SystemLanguage, string> current = enumerator.Current; if (current.Value == language) { KeyValuePair <SystemLanguage, string> pair2 = enumerator.Current; this.CurrentLanguage = pair2.Key; Debug.Log("change language -> " + this.CurrentLanguage); PlayerPrefsEncrypt.SetInt("LocalLanguage", (int)this.CurrentLanguage); Facade.Instance.SendNotification("PUB_LANGUAGE_UPDATE"); break; } } }
public void GuideBattleNext() { if (this.GetNeedGuide()) { this.RemoveLastGuide(); this.guideStep++; switch (this.guideStep) { case 1: case 2: case 3: this.currentobj = this.GetGuideObj(this.guideStep); GameLogic.Release.Mode.RoomGenerate.AddGuildToMap(this.currentobj); break; } if (this.guideStep == 3) { PlayerPrefsEncrypt.SetBool("guide_battle", true); this.bBattleNeedGuide = false; LocalSave.Instance.SaveExtra.SetGuideBattleProcess(1); } } }
private bool GetMusicLocal() => PlayerPrefsEncrypt.GetBool("Music", true);
public void SetSound(bool sound) { PlayerPrefsEncrypt.SetBool("Sound", sound); this.bSound = sound; }
public void SetMusic(bool music) { PlayerPrefsEncrypt.SetBool("Music", music); this.bMusic = music; this.UpdateMusicVolume(); }
private bool GetSoundLocal() => PlayerPrefsEncrypt.GetBool("Sound", true);
public LanguageManager() { Dictionary <int, string> dictionary = new Dictionary <int, string> { { 1, "I" }, { 2, "II" }, { 3, "III" }, { 4, "IV" }, { 5, "V" }, { 6, "VI" }, { 7, "VII" }, { 8, "VIII" }, { 9, "IX" }, { 10, "X" }, { 11, "XI" }, { 12, "XII" } }; this.mStageIndexs = dictionary; this.m_LanguageList = LocalModelManager.Instance.Language_lauguage.GetBeanDic(); int @int = PlayerPrefsEncrypt.GetInt("LocalLanguage", -1); if (@int < 0) { this.CurrentLanguage = Application.systemLanguage; if (this.CurrentLanguage == SystemLanguage.Chinese) { this.CurrentLanguage = SystemLanguage.ChineseSimplified; } } else { this.CurrentLanguage = (SystemLanguage)@int; } }
public static int GameCenter_get_login_count() => PlayerPrefsEncrypt.GetInt("gamecenter_login_count", 0);
public static void GameCenter_clear_login_count() { PlayerPrefsEncrypt.SetInt("gamecenter_login_count", 0); }
public static void GameCenter_add_login_count() { int num = GameCenter_get_login_count(); PlayerPrefsEncrypt.SetInt("gamecenter_login_count", num + 1); }
protected override void OnFlush() { PlayerPrefsEncrypt.SetInt(base.name, this.value); }
public PrefDataInt(string name) : base(name) { this.value = PlayerPrefsEncrypt.GetInt(base.name, 0); }
public void Init() { if (this.bBattleNeedGuide && ((!LocalSave.Instance.GetNoCard() || (LocalSave.Instance.GetHaveEquips(true).Count > 1)) || ((LocalSave.Instance.GetGold() > 100L) || PlayerPrefsEncrypt.GetBool("guide_battle", false)))) { this.bBattleNeedGuide = false; LocalSave.Instance.SaveExtra.SetGuideBattleProcess(2); } this.Card_Init(); this.Equip_Init(); }