|
|
@@ -328,24 +328,29 @@ public class UserInfo {
|
|
|
public int diamond = 1000;
|
|
|
public List<PropInfo> bagList = new List<PropInfo>();
|
|
|
public List<DeviceInfo> deviceList = new List<DeviceInfo>();
|
|
|
- public Hashtable timeLimitGameHighestScores = new Hashtable();
|
|
|
- public bool deviceCalibrateGuideFinish = false;
|
|
|
- public bool gameRule1GuideFinish = false;
|
|
|
- public bool gameRule2GuideFinish = false;
|
|
|
- //闯关记录(索引0~2分别表示野兔、野鸡、野狼的通关数)
|
|
|
- public int[] challengeLevels = {0, 0, 0};
|
|
|
+ //显示游戏最高分(不同距离分数独立)
|
|
|
+ public Dictionary<string, float> timeLimitGameScores = new Dictionary<string, float>();
|
|
|
+ //闯关记录(gameType:通关数)(野兔、野鸡、野狼的通关数)
|
|
|
+ public Dictionary<int, int> challengeLevels = new Dictionary<int, int>();
|
|
|
public void Save()
|
|
|
{
|
|
|
LoginMgr.SaveUserInfo(this);
|
|
|
}
|
|
|
public void SetChallengeLevelPass(int gameType, int level) {
|
|
|
if (gameType != 3 && gameType != 4 && gameType != 5) return;
|
|
|
- int index = gameType - 3;
|
|
|
- int currentLevel = challengeLevels[index];
|
|
|
- if (currentLevel < level) challengeLevels[index] = level;
|
|
|
+ if (challengeLevels.ContainsKey(gameType)) {
|
|
|
+ if (level <= challengeLevels[gameType]) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ challengeLevels.Remove(gameType);
|
|
|
+ challengeLevels.Add(gameType, level);
|
|
|
}
|
|
|
public int GetChallengeLevelPass(int gameType) {
|
|
|
- return challengeLevels[gameType - 3];
|
|
|
+ if (challengeLevels.ContainsKey(gameType)) {
|
|
|
+ return challengeLevels[gameType];
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
}
|
|
|
}
|
|
|
public class UserSettings {
|
|
|
@@ -360,6 +365,11 @@ public class UserSettings {
|
|
|
//游戏里的箭重,单位克
|
|
|
public float actualArrowWeight = 20;
|
|
|
|
|
|
+ //设备校准引导-是否已经完成
|
|
|
+ public bool deviceCalibrateGuideFinish = false;
|
|
|
+ //游戏规则引导-是否已经完成(完成则保存对应的GameType)
|
|
|
+ public HashSet<int> gameRuleGuideFinish = new HashSet<int>();
|
|
|
+
|
|
|
private static UserSettings _ins;
|
|
|
public static UserSettings ins {
|
|
|
get {
|