修改分数赋值模型逻辑:分数只得一次,对了得分,错了不得分,如果做到一半出去,就保留做对的分数,错误的步骤不会再次得分,重新进入软件再重新得分。
This commit is contained in:
parent
ecbb453f5c
commit
7675674e93
7
Assets/_Scenes/网页端打包须知.txt.meta
Normal file
7
Assets/_Scenes/网页端打包须知.txt.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e9e1343c9d1b684fb32c4bc470a8ac3
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -135,6 +135,7 @@ namespace ZXK.LouDiXvMuNiu
|
||||
}
|
||||
return scoreFinish;
|
||||
}
|
||||
private HashSet<string> _wrongSteps = new HashSet<string>();
|
||||
/// <summary>
|
||||
/// 操作正确步骤后得分
|
||||
/// </summary>
|
||||
@ -142,8 +143,17 @@ namespace ZXK.LouDiXvMuNiu
|
||||
/// <param name="smallStepName">三级任务名称</param>
|
||||
/// <param name="score">当前步骤可得分数</param>
|
||||
/// <returns></returns>
|
||||
/// <param name="score">当前步骤获得的分数</param>
|
||||
/// <returns></returns>
|
||||
public float AddScore(string bigStepName, string smallStepName, float score)
|
||||
{
|
||||
string stepKey = bigStepName + "_" + smallStepName;
|
||||
// 检查该步骤是否已经获得过分数或者是否是错误步骤
|
||||
if (_examScore.ContainsKey(bigStepName) && _examScore[bigStepName].ContainsKey(smallStepName) || _wrongSteps.Contains(stepKey))
|
||||
{
|
||||
return _examScore.ContainsKey(bigStepName) && _examScore[bigStepName].ContainsKey(smallStepName) ? _examScore[bigStepName][smallStepName] : 0;
|
||||
}
|
||||
|
||||
if (!_examScore.ContainsKey(bigStepName))
|
||||
{
|
||||
_examScore.Add(bigStepName, new Dictionary<string, float>());
|
||||
@ -154,16 +164,34 @@ namespace ZXK.LouDiXvMuNiu
|
||||
}
|
||||
_examScore[bigStepName][smallStepName] += score;
|
||||
|
||||
if (scoreTime.ContainsKey(bigStepName + smallStepName) == false)
|
||||
if (scoreTime.ContainsKey(stepKey) == false)
|
||||
{
|
||||
scoreTime.Add(bigStepName + smallStepName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
scoreTime.Add(stepKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
else
|
||||
{
|
||||
scoreTime[bigStepName + smallStepName] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
scoreTime[stepKey] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
return _examScore[bigStepName][smallStepName];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标记步骤为错误步骤
|
||||
/// </summary>
|
||||
/// <param name="bigStepName">模块名称</param>
|
||||
/// <param name="smallStepName">子步骤名称</param>
|
||||
public void MarkStepAsWrong(string bigStepName, string smallStepName)
|
||||
{
|
||||
string stepKey = bigStepName + "_" + smallStepName;
|
||||
_wrongSteps.Add(stepKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -867,6 +867,9 @@ namespace ZXK.LouDiXvMuNiu
|
||||
useBts.Clear();
|
||||
addScoreTemp = false;
|
||||
PopUpMng.PopChoseErrorToast(_CurSceneStep.ExamEvvr, 2.0f, null);
|
||||
// 标记步骤为错误步骤
|
||||
GameManager.Instance._DataNiuHandler.MarkStepAsWrong(_CurSceneStep.ModuleName, _CurSceneStep.ThreeTaskName);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ namespace ZXK.LouDiXvMuNiu
|
||||
case "TrainState":
|
||||
case "ExamState":
|
||||
PopUpMng.PopConBox("提示", "是否退出当前模块?", "是", "否", () => {
|
||||
GameManager.Instance._DataNiuHandler._examScore.Clear();
|
||||
// GameManager.Instance._DataNiuHandler._examScore.Clear();
|
||||
GameManager.Instance._StateContext.SetState(
|
||||
new ModelSelectState(GameManager.Instance._StateContext));
|
||||
});
|
||||
|
||||
@ -97,6 +97,9 @@ namespace ZXK.LouDiXvMuNiu
|
||||
toolItemGeo.transform.Find("BeUseImg").gameObject.SetActive(true);
|
||||
toolItemGeo.transform.Find("BeUseImg/ChoseError").gameObject.SetActive(true);
|
||||
});
|
||||
// 标记步骤为错误步骤
|
||||
GameManager.Instance._DataNiuHandler.MarkStepAsWrong(curStep.ModuleName, curStep.ThreeTaskName);
|
||||
|
||||
}
|
||||
});
|
||||
toolItemGeo.SetActive(true);
|
||||
|
||||
@ -79,7 +79,7 @@ PlayerSettings:
|
||||
androidAutoRotationBehavior: 1
|
||||
defaultIsNativeResolution: 1
|
||||
macRetinaSupport: 1
|
||||
runInBackground: 0
|
||||
runInBackground: 1
|
||||
captureSingleScreen: 0
|
||||
muteOtherAudioSources: 0
|
||||
Prepare IOS For Recording: 0
|
||||
@ -137,7 +137,7 @@ PlayerSettings:
|
||||
vulkanEnableLateAcquireNextImage: 0
|
||||
vulkanEnableCommandBufferRecycling: 1
|
||||
loadStoreDebugModeEnabled: 0
|
||||
bundleVersion: 0.1.1
|
||||
bundleVersion: 0.1.2
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
||||
@ -26,7 +26,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 400, y: 100}
|
||||
m_MaxSize: {x: 32384, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 8713
|
||||
controlID: 1085
|
||||
--- !u!114 &2
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@ -49,9 +49,9 @@ MonoBehaviour:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 287
|
||||
width: 753
|
||||
height: 712
|
||||
y: 475
|
||||
width: 712
|
||||
height: 524
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -104,10 +104,10 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 21
|
||||
width: 753
|
||||
height: 691
|
||||
m_Scale: {x: 0.3921875, y: 0.3921875}
|
||||
m_Translation: {x: 376.5, y: 345.5}
|
||||
width: 712
|
||||
height: 503
|
||||
m_Scale: {x: 0.37083334, y: 0.37083337}
|
||||
m_Translation: {x: 356, y: 251.50002}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
@ -115,12 +115,12 @@ MonoBehaviour:
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -960
|
||||
y: -880.9562
|
||||
y: -678.2022
|
||||
width: 1920
|
||||
height: 1761.9124
|
||||
height: 1356.4044
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 0.3921875
|
||||
m_LastWindowPixelSize: {x: 753, y: 712}
|
||||
m_defaultScale: 0.37083334
|
||||
m_LastWindowPixelSize: {x: 712, y: 524}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 00000000000000000000
|
||||
@ -145,12 +145,12 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 754
|
||||
width: 713
|
||||
height: 947
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 8096, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 8714
|
||||
controlID: 1086
|
||||
--- !u!114 &4
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@ -168,8 +168,8 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 754
|
||||
height: 214
|
||||
width: 713
|
||||
height: 402
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_ActualView: {fileID: 5}
|
||||
@ -201,8 +201,8 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 73
|
||||
width: 753
|
||||
height: 193
|
||||
width: 712
|
||||
height: 381
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -561,9 +561,9 @@ MonoBehaviour:
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: 1439, y: 307, z: 0}
|
||||
m_Target: {x: 0.9102906, y: 0.028324064, z: 0.020564094}
|
||||
speed: 2
|
||||
m_Value: {x: 1439, y: 307, z: 0}
|
||||
m_Value: {x: 0.9102906, y: 0.028324064, z: 0.020564094}
|
||||
m_RenderMode: 0
|
||||
m_CameraMode:
|
||||
drawMode: 0
|
||||
@ -613,9 +613,9 @@ MonoBehaviour:
|
||||
speed: 2
|
||||
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_Size:
|
||||
m_Target: 312.9015
|
||||
m_Target: 7.9435906
|
||||
speed: 2
|
||||
m_Value: 312.9015
|
||||
m_Value: 7.9435906
|
||||
m_Ortho:
|
||||
m_Target: 1
|
||||
speed: 2
|
||||
@ -729,11 +729,11 @@ MonoBehaviour:
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 214
|
||||
width: 754
|
||||
height: 733
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
y: 402
|
||||
width: 713
|
||||
height: 545
|
||||
m_MinSize: {x: 101, y: 121}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 2}
|
||||
m_Panes:
|
||||
- {fileID: 2}
|
||||
@ -754,12 +754,12 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 754
|
||||
x: 713
|
||||
y: 0
|
||||
width: 564
|
||||
width: 266
|
||||
height: 947
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_MinSize: {x: 202, y: 221}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 9}
|
||||
m_Panes:
|
||||
- {fileID: 9}
|
||||
@ -787,9 +787,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 754
|
||||
x: 713
|
||||
y: 73
|
||||
width: 562
|
||||
width: 264
|
||||
height: 926
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -804,9 +804,9 @@ MonoBehaviour:
|
||||
m_SceneHierarchy:
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_SelectedIDs: f6290000
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: fe12d2ffe0ebd2ff5a2bd4ff8e64d4ff9464d4fff296d4fff866d6ffd896dfffdab8dfff5220edff2c21edff6081edffa681edff0c44f7ff46adf7fffec6f7ff02c7f7ff2efbfffff4ffffff007b00001c7b0000227b0000367b00003c7b0000467b0000906d0100b86d010092750100e47501003a420200564202005c420200704202007642020080420200924c0300dc4c0300c05303006c540300be540300c4600300b46703008a740300527d0300541304002e1b0400801b040058310400083f0400
|
||||
m_ExpandedIDs: 22fbffff
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -851,9 +851,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 754
|
||||
x: 1111
|
||||
y: 73
|
||||
width: 562
|
||||
width: 223
|
||||
height: 926
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -880,9 +880,9 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1318
|
||||
x: 979
|
||||
y: 0
|
||||
width: 238
|
||||
width: 330
|
||||
height: 947
|
||||
m_MinSize: {x: 232, y: 271}
|
||||
m_MaxSize: {x: 10002, y: 10021}
|
||||
@ -912,9 +912,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1318
|
||||
x: 979
|
||||
y: 73
|
||||
width: 236
|
||||
width: 328
|
||||
height: 926
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
@ -927,7 +927,7 @@ MonoBehaviour:
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
m_SearchFilter:
|
||||
m_NameFilter:
|
||||
m_NameFilter: Sele
|
||||
m_ClassNames: []
|
||||
m_AssetLabels: []
|
||||
m_AssetBundleNames: []
|
||||
@ -937,9 +937,9 @@ MonoBehaviour:
|
||||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/_Scripts/Application/States
|
||||
- Assets/_Scripts
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_OriginalText: Sele
|
||||
m_ImportLogFlags: 0
|
||||
m_FilterByTypeIntersection: 0
|
||||
m_ViewMode: 0
|
||||
@ -953,7 +953,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 10690000
|
||||
m_LastClickedID: 26896
|
||||
m_ExpandedIDs: ffffffff000000009a7b00009c7b00009e7b0000a07b0000a27b0000a47b0000a67b0000a87b0000aa7b0000ac7b0000ae7b0000b07b0000b27b0000b47b0000b67b0000b87b0000ba7b0000bc7b0000be7b0000c07b0000c27b0000c47b0000c67b0000c87b0000ca7b0000cc7b0000ce7b0000d07b0000d27b0000d47b0000d67b0000d87b0000da7b0000dc7b0000de7b0000e07b0000e27b0000e47b0000ee7e0000f07e0000087f0000f4490100fa490100
|
||||
m_ExpandedIDs: ffffffff00000000a27b0000a47b0000a67b0000a87b0000aa7b0000ac7b0000ae7b0000b07b0000b27b0000b47b0000b67b0000b87b0000ba7b0000bc7b0000be7b0000c07b0000c27b0000c47b0000c67b0000c87b0000ca7b0000cc7b0000ce7b0000d07b0000d27b0000d47b0000d67b0000d87b0000da7b0000dc7b0000de7b0000e07b0000e27b0000e47b0000e67b0000e87b0000ea7b0000ec7b0000ee7b0000f07b0000f27b0000f47b0000f67b0000f87b0000fa7b0000fc7b0000fe7b0000007c0000027c0000047c0000067c0000087c00000a7c0000167f000020820000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -978,10 +978,10 @@ MonoBehaviour:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_AssetTreeState:
|
||||
scrollPos: {x: 0, y: 564}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: ffffffff000000009a7b00009c7b00009e7b0000a07b0000a27b0000a47b0000a67b0000a87b0000aa7b0000ac7b0000ae7b0000b07b0000b27b0000b47b0000b67b0000b87b0000ba7b0000bc7b0000be7b0000c07b0000c27b0000c47b0000c67b0000c87b0000ca7b0000cc7b0000ce7b0000d07b0000d27b0000d47b0000d67b0000d87b0000da7b0000dc7b0000de7b0000e07b0000e27b0000e47b0000ee7e0000f07e0000007f0000087f0000f4490100fa490100fc490100fe49010024280400
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: f6290000
|
||||
m_LastClickedID: 10742
|
||||
m_ExpandedIDs: ffffffff00000000a27b0000a47b0000a67b0000a87b0000aa7b0000ac7b0000ae7b0000b07b0000b27b0000b47b0000b67b0000b87b0000ba7b0000bc7b0000be7b0000c07b0000c27b0000c47b0000c67b0000c87b0000ca7b0000cc7b0000ce7b0000d07b0000d27b0000d47b0000d67b0000d87b0000da7b0000dc7b0000de7b0000e07b0000e27b0000e47b0000e67b0000e87b0000ea7b0000ec7b0000ee7b0000f07b0000f27b0000f47b0000f67b0000f87b0000fa7b0000fc7b0000fe7b0000007c0000027c0000047c0000067c0000087c00000a7c0000167f000020820000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -1006,24 +1006,24 @@ MonoBehaviour:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_ListAreaState:
|
||||
m_SelectedInstanceIDs:
|
||||
m_LastClickedInstanceID: 0
|
||||
m_SelectedInstanceIDs: f6290000
|
||||
m_LastClickedInstanceID: 10742
|
||||
m_HadKeyboardFocusLastEvent: 1
|
||||
m_ExpandedInstanceIDs: f46c0000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name: NiuSceneMng
|
||||
m_OriginalName: NiuSceneMng
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 3096
|
||||
m_UserData: 0
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 11}
|
||||
m_CreateAssetUtility:
|
||||
@ -1052,12 +1052,12 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1556
|
||||
x: 1309
|
||||
y: 0
|
||||
width: 364
|
||||
width: 611
|
||||
height: 947
|
||||
m_MinSize: {x: 275, y: 50}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_MinSize: {x: 276, y: 71}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 14}
|
||||
m_Panes:
|
||||
- {fileID: 14}
|
||||
@ -1084,9 +1084,9 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1556
|
||||
x: 1309
|
||||
y: 73
|
||||
width: 363
|
||||
width: 610
|
||||
height: 926
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user