Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
    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);
    }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
 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;
         }
     }
 }
Exemplo n.º 5
0
 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);
         }
     }
 }
Exemplo n.º 6
0
 private bool GetMusicLocal() =>
 PlayerPrefsEncrypt.GetBool("Music", true);
Exemplo n.º 7
0
 public void SetSound(bool sound)
 {
     PlayerPrefsEncrypt.SetBool("Sound", sound);
     this.bSound = sound;
 }
Exemplo n.º 8
0
 public void SetMusic(bool music)
 {
     PlayerPrefsEncrypt.SetBool("Music", music);
     this.bMusic = music;
     this.UpdateMusicVolume();
 }
Exemplo n.º 9
0
 private bool GetSoundLocal() =>
 PlayerPrefsEncrypt.GetBool("Sound", true);
Exemplo n.º 10
0
    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;
        }
    }
Exemplo n.º 11
0
 public static int GameCenter_get_login_count() =>
 PlayerPrefsEncrypt.GetInt("gamecenter_login_count", 0);
Exemplo n.º 12
0
 public static void GameCenter_clear_login_count()
 {
     PlayerPrefsEncrypt.SetInt("gamecenter_login_count", 0);
 }
Exemplo n.º 13
0
    public static void GameCenter_add_login_count()
    {
        int num = GameCenter_get_login_count();

        PlayerPrefsEncrypt.SetInt("gamecenter_login_count", num + 1);
    }
Exemplo n.º 14
0
 protected override void OnFlush()
 {
     PlayerPrefsEncrypt.SetInt(base.name, this.value);
 }
Exemplo n.º 15
0
 public PrefDataInt(string name) : base(name)
 {
     this.value = PlayerPrefsEncrypt.GetInt(base.name, 0);
 }
Exemplo n.º 16
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();
 }