修复M键不能及时反映解锁Mouse

This commit is contained in:
Koha9 2023-11-05 01:29:09 +09:00
parent ba27cab015
commit 90cf429893
3 changed files with 66 additions and 64 deletions

View File

@ -144,8 +144,10 @@ private void CalculateCurrentIncrease(bool moving)
private void Update() private void Update()
{ {
if (Input.GetKey(KeyCode.M)) if (Input.GetKeyDown(KeyCode.M))
{
_active = !_active; _active = !_active;
}
if (!_active) if (!_active)
{ {

View File

@ -1 +1 @@
{"count":1,"self":9.1397576,"total":9.212819,"children":{"InitializeActuators":{"count":2,"self":0.0010002,"total":0.0010002,"children":null},"InitializeSensors":{"count":2,"self":0.0015489,"total":0.0015489,"children":null},"AgentSendState":{"count":219,"self":0.0015002,"total":0.0100013,"children":{"CollectObservations":{"count":219,"self":0.0070000999999999996,"total":0.0070000999999999996,"children":null},"WriteActionMask":{"count":219,"self":0,"total":0,"children":null},"RequestDecision":{"count":219,"self":0.001501,"total":0.001501,"children":null}}},"DecideAction":{"count":219,"self":0.0040143999999999996,"total":0.0040143999999999996,"children":null},"AgentAct":{"count":219,"self":0.0554905,"total":0.0554905,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1698982952","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId d5984e41-9eb5-419b-b909-c7102a7a038f -accessToken RDU4dwbHFHagpTZ1DzxqC9PfukLNfl08b_FimOGj3eo00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Train","end_time_seconds":"1698982961"}} {"count":1,"self":41.657455999999996,"total":42.1863312,"children":{"InitializeActuators":{"count":2,"self":0.0014979,"total":0.0014979,"children":null},"InitializeSensors":{"count":2,"self":0.0010002,"total":0.0010002,"children":null},"AgentSendState":{"count":1869,"self":0.0095243999999999988,"total":0.0793195,"children":{"CollectObservations":{"count":1869,"self":0.0647871,"total":0.0647871,"children":null},"WriteActionMask":{"count":1869,"self":0.0015029,"total":0.0015029,"children":null},"RequestDecision":{"count":1869,"self":0.0035050999999999997,"total":0.0035050999999999997,"children":null}}},"DecideAction":{"count":1869,"self":0.017555499999999998,"total":0.017555499999999998,"children":null},"AgentAct":{"count":1869,"self":0.4279918,"total":0.4279918,"children":null}},"gauges":{"AKMAgent.CumulativeReward":{"count":1,"max":-3977.69214,"min":-3977.69214,"runningAverage":-3977.69214,"value":-3977.69214,"weightedAverage":-3977.69214}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1699114974","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-iVxZt6N1rYEVvTzvxaHH_ -hubSessionId f025447c-6ba0-43d0-aea0-dea85acd986d -accessToken xc4geEFKOB3CjD609sUPC74gvm_WjG_EuXqWgPfBY8Q00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Train","end_time_seconds":"1699115016"}}

View File

@ -14,16 +14,16 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_PixelRect: m_PixelRect:
serializedVersion: 2 serializedVersion: 2
x: -108 x: 64
y: 61 y: 43
width: 1920 width: 1856
height: 1037 height: 1037
m_ShowMode: 4 m_ShowMode: 4
m_Title: Console m_Title: Inspector
m_RootView: {fileID: 2} m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 300} m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 0 m_Maximized: 1
--- !u!114 &2 --- !u!114 &2
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -44,7 +44,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1920 width: 1856
height: 1037 height: 1037
m_MinSize: {x: 875, y: 300} m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000} m_MaxSize: {x: 10000, y: 10000}
@ -69,7 +69,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1920 width: 1856
height: 30 height: 30
m_MinSize: {x: 0, y: 0} m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0}
@ -91,7 +91,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 1017 y: 1017
width: 1920 width: 1856
height: 20 height: 20
m_MinSize: {x: 0, y: 0} m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0}
@ -115,12 +115,12 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 30 y: 30
width: 1920 width: 1856
height: 987 height: 987
m_MinSize: {x: 300, y: 200} m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 0 vertical: 0
controlID: 130 controlID: 95
--- !u!114 &6 --- !u!114 &6
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -140,12 +140,12 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1083 width: 1047
height: 987 height: 987
m_MinSize: {x: 100, y: 200} m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192} m_MaxSize: {x: 8096, y: 16192}
vertical: 1 vertical: 1
controlID: 131 controlID: 96
--- !u!114 &7 --- !u!114 &7
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -163,8 +163,8 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 1083 width: 1047
height: 706 height: 707
m_MinSize: {x: 201, y: 221} m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 13} m_ActualView: {fileID: 13}
@ -189,9 +189,9 @@ MonoBehaviour:
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 706 y: 707
width: 1083 width: 1047
height: 281 height: 280
m_MinSize: {x: 231, y: 271} m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021} m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 15} m_ActualView: {fileID: 15}
@ -217,14 +217,14 @@ MonoBehaviour:
- {fileID: 11} - {fileID: 11}
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 1083 x: 1047
y: 0 y: 0
width: 472 width: 457
height: 987 height: 987
m_MinSize: {x: 100, y: 200} m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192} m_MaxSize: {x: 8096, y: 16192}
vertical: 1 vertical: 1
controlID: 58 controlID: 108
--- !u!114 &10 --- !u!114 &10
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -242,8 +242,8 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 0 y: 0
width: 472 width: 457
height: 556 height: 557
m_MinSize: {x: 202, y: 221} m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021} m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 17} m_ActualView: {fileID: 17}
@ -267,11 +267,11 @@ MonoBehaviour:
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 0 x: 0
y: 556 y: 557
width: 472 width: 457
height: 431 height: 430
m_MinSize: {x: 100, y: 100} m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 18} m_ActualView: {fileID: 18}
m_Panes: m_Panes:
- {fileID: 18} - {fileID: 18}
@ -293,9 +293,9 @@ MonoBehaviour:
m_Children: [] m_Children: []
m_Position: m_Position:
serializedVersion: 2 serializedVersion: 2
x: 1555 x: 1504
y: 0 y: 0
width: 365 width: 352
height: 987 height: 987
m_MinSize: {x: 276, y: 71} m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021} m_MaxSize: {x: 4001, y: 4021}
@ -324,10 +324,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: -108 x: 64
y: 91 y: 73
width: 1082 width: 1046
height: 685 height: 686
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@ -562,9 +562,9 @@ MonoBehaviour:
m_PlayAudio: 0 m_PlayAudio: 0
m_AudioPlay: 0 m_AudioPlay: 0
m_Position: m_Position:
m_Target: {x: 462, y: 315.5, z: 0} m_Target: {x: 318.13617, y: 321.4294, z: -3.9026704}
speed: 2 speed: 2
m_Value: {x: 462, y: 315.5, z: 0} m_Value: {x: 318.13617, y: 321.4294, z: -3.9026704}
m_RenderMode: 0 m_RenderMode: 0
m_CameraMode: m_CameraMode:
drawMode: 0 drawMode: 0
@ -615,9 +615,9 @@ MonoBehaviour:
speed: 2 speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1} m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size: m_Size:
m_Target: 0.8660254 m_Target: 819.6217
speed: 2 speed: 2
m_Value: 0.8660254 m_Value: 819.6217
m_Ortho: m_Ortho:
m_Target: 1 m_Target: 1
speed: 2 speed: 2
@ -754,10 +754,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: -108 x: 64
y: 797 y: 780
width: 1082 width: 1046
height: 260 height: 259
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@ -775,22 +775,22 @@ MonoBehaviour:
m_SkipHidden: 0 m_SkipHidden: 0
m_SearchArea: 1 m_SearchArea: 1
m_Folders: m_Folders:
- Assets/Scenes - Assets/FreeFlyCamera/Scripts
m_Globs: [] m_Globs: []
m_OriginalText: m_OriginalText:
m_ViewMode: 1 m_ViewMode: 1
m_StartGridSize: 16 m_StartGridSize: 16
m_LastFolders: m_LastFolders:
- Assets/Script - Assets/FreeFlyCamera/Scripts
m_LastFoldersGridSize: 16 m_LastFoldersGridSize: 16
m_LastProjectPath: C:\Users\UCUNI\OneDrive\Unity\ML-Agents\Aimbot-ParallelEnv m_LastProjectPath: C:\Users\UCUNI\OneDrive\Unity\ML-Agents\Aimbot-ParallelEnv
m_LockTracker: m_LockTracker:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 271}
m_SelectedIDs: 05ca9a3b m_SelectedIDs: 90880000
m_LastClickedID: 1000000005 m_LastClickedID: 34960
m_ExpandedIDs: 0000000016880000188800001a8800001c8800001e88000020880000228800002488000026880000288800002a8800002c8800002e8800003088000032880000348800003688000000ca9a3bffffff7f m_ExpandedIDs: 0000000016880000188800001a8800001c8800001e88000020880000228800002488000026880000288800002a8800002c8800002e880000308800003288000034880000368800005a88000000ca9a3bffffff7f
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -845,7 +845,7 @@ MonoBehaviour:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0 m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c62300008a5c000000000000 m_ExpandedInstanceIDs: c62300008a5c000000000000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
@ -922,10 +922,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 975 x: 1111
y: 91 y: 73
width: 470 width: 455
height: 535 height: 536
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@ -933,9 +933,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: 8c8f0000 m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: c6beffff32fbffff m_ExpandedIDs: 32fbffff
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -979,10 +979,10 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 975 x: 1111
y: 647 y: 630
width: 470 width: 455
height: 410 height: 409
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas:
m_LastAppliedPresetName: Default m_LastAppliedPresetName: Default
@ -999,7 +999,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6c262c1329a02fa49b5cb4c297106f3f, type: 3} m_Script: {fileID: 11500000, guid: 6c262c1329a02fa49b5cb4c297106f3f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_MinSize: {x: 136, y: 30} m_MinSize: {x: 129, y: 28}
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4000, y: 4000}
m_TitleContent: m_TitleContent:
m_Text: ProBuilder m_Text: ProBuilder
@ -1035,9 +1035,9 @@ MonoBehaviour:
m_Tooltip: m_Tooltip:
m_Pos: m_Pos:
serializedVersion: 2 serializedVersion: 2
x: 1447 x: 1568
y: 91 y: 73
width: 364 width: 351
height: 966 height: 966
m_ViewDataDictionary: {fileID: 0} m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: m_OverlayCanvas: