private static void PassAllStage_Func(object[] objs) { Debug.Log("pass"); //string numAllStar = "numAllStar"; string isUnlock = "isUnlock"; string isCompleted = "isCompleted"; //string numStar = "numStar"; LevelConfig_ARRAY m_config = LevelMgr.GetInstance().GetLevelConfigArray(); for (int i = 0; i < m_config.Items.Count; i++) { string id = m_config.Items[i].LevelId.ToString(); //设置关卡解锁状态 XPlayerPrefs.SetInt(id + isUnlock, -1); XPlayerPrefs.SetInt(id + isCompleted, 1); ////设置当前关卡星星 //int preStar = XPlayerPrefs.GetInt(id + numStar); //XPlayerPrefs.SetInt(id + numStar, 3); ////设置总星星数量 //int curNum = XPlayerPrefs.GetInt(numAllStar); //XPlayerPrefs.SetInt(numAllStar, curNum + 3 - preStar); } //保存 XPlayerPrefs.Save(); }
protected override void Init() { m_config = ResBinReader.Read <LevelConfig_ARRAY>("LevelConfig"); SortConfig(); m_themeConfig = ResBinReader.Read <ThemeConfig_ARRAY>("ThemeConfig"); m_value = ResBinReader.Read <ValueConfig_ARRAY>("ValueConfig"); m_data = LevelLoader.Load(); if (m_data == null) { Debuger.Log(Tag, string.Empty, "m_data == null"); } CurPlayMode = GamePlayModule.Normal; }