缓存读取

This commit is contained in:
liuyu 2024-09-04 17:28:08 +08:00
parent 1597d53826
commit 36c6945209
2 changed files with 21 additions and 16 deletions

View File

@ -226,16 +226,20 @@ public class ReconnectMgr : SingletonMono<ReconnectMgr>
//恢复记录的分数
ScoreBase scoreBase = FindFirstObjectByType<ScoreBase>();
Dictionary<int, ScoreSubjectStep> reconnectScore = scoreBase.GetStepScore();
foreach (var item in UserExamStat.allSubScore)
if (scoreBase != null)
{
if (reconnectScore.ContainsKey(item.index))
Dictionary<int, ScoreSubjectStep> reconnectScore = scoreBase.GetStepScore();
foreach (var item in UserExamStat.allSubScore)
{
reconnectScore[item.index].currentScore = item.currentScore;
reconnectScore[item.index].isDone = item.isDone;
if (reconnectScore.ContainsKey(item.index))
{
reconnectScore[item.index].currentScore = item.currentScore;
reconnectScore[item.index].isDone = item.isDone;
}
}
scoreBase.setCurrentScore(UserExamStat.currentScore);
scoreBase.LoadSceneBufferList(UserExamStat.currentSceneOtherInfo);
}
scoreBase.setCurrentScore(UserExamStat.currentScore);
});
}

View File

@ -117,13 +117,13 @@
"工作服",
"绝缘手套",
"绝缘靴",
"绝缘胶带",
"盒装封印",
"工作证",
"三相四线电能表",
"绝缘螺丝刀",
"三相四线电能表",
"剥线钳",
"验电笔",
"剥线钳"
"工作证",
"盒装封印",
"绝缘胶带"
],
"allWear": [
"国网安全帽",
@ -214,7 +214,7 @@
},
"selfRotInScene": {
"x": 0.0,
"y": 77.57858,
"y": 167.325,
"z": 0.0
}
},
@ -228,7 +228,7 @@
},
"selfRotInScene": {
"x": 0.0,
"y": 93.803894,
"y": 339.212341,
"z": 0.0
}
},
@ -391,12 +391,12 @@
"triggerName": "A_in_螺丝up",
"selfPosInScene": {
"x": 0.0501709,
"y": 0.0256958,
"y": 0.005695801,
"z": -0.09305191
},
"selfRotInScene": {
"x": 0.0,
"y": 0.0,
"y": 322.987,
"z": 0.0
}
},
@ -708,5 +708,6 @@
"z": 0.0
}
}
]
],
"currentSceneOtherInfo": "{\r\n \"TestPen3list\": [\r\n \"验电笔+插座\",\r\n \"验电笔+柜门\",\r\n \"验电笔+插座\"\r\n ],\r\n \"InSwitchCloseYDList\": [\r\n \"验电笔+in开关_螺丝1\",\r\n \"验电笔+in开关_螺丝2\",\r\n \"验电笔+in开关_螺丝3\"\r\n ],\r\n \"InSwitchOpenYDList\": [],\r\n \"currentunInstallJieXian\": [\r\n \"A_in_螺丝up\"\r\n ],\r\n \"currentInstallJieXian\": [],\r\n \"installCover\": [],\r\n \"currentInstallTestJieXian\": []\r\n}"
}