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