diff --git a/U3D_DrivingSystem/Assets/Scenes/main_.unity b/U3D_DrivingSystem/Assets/Scenes/main_.unity index fb807c3c..e7efda1e 100644 --- a/U3D_DrivingSystem/Assets/Scenes/main_.unity +++ b/U3D_DrivingSystem/Assets/Scenes/main_.unity @@ -118276,7 +118276,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &372195433 RectTransform: m_ObjectHideFlags: 0 @@ -147085,7 +147085,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &463649141 Transform: m_ObjectHideFlags: 0 @@ -379705,7 +379705,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1223963662 RectTransform: m_ObjectHideFlags: 0 @@ -397347,7 +397347,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1276762317} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: bbeae135ab034b18b4ee0f161868df08, type: 3} m_Name: @@ -397361,6 +397361,9 @@ MonoBehaviour: menuUI: {fileID: 1648579876} carInfoUI: {fileID: 1944520099} ygq: {fileID: 1559914993} + shache: + - {fileID: 469820069} + - {fileID: 1337615172} --- !u!1 &1277129999 GameObject: m_ObjectHideFlags: 0 @@ -644198,7 +644201,7 @@ PrefabInstance: - target: {fileID: 5904705805594164072, guid: 4292160a5e1fde347934ac660b2c5d30, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 6214432986421238931, guid: 4292160a5e1fde347934ac660b2c5d30, type: 3} diff --git a/U3D_DrivingSystem/Assets/Script/CarGearControl.cs b/U3D_DrivingSystem/Assets/Script/CarGearControl.cs index 86918b26..665bdf32 100644 --- a/U3D_DrivingSystem/Assets/Script/CarGearControl.cs +++ b/U3D_DrivingSystem/Assets/Script/CarGearControl.cs @@ -135,7 +135,7 @@ namespace Script { this.GetComponent().enabled = false; this.GetComponent().enabled = true; - + this.GetComponent().enabled = true; this.GetComponent().Init(); Debug.Log("断开连接"); } diff --git a/U3D_DrivingSystem/Assets/Script/Manaegr/CarInputManager.cs b/U3D_DrivingSystem/Assets/Script/Manaegr/CarInputManager.cs index 3ed6aca2..4afbb180 100644 --- a/U3D_DrivingSystem/Assets/Script/Manaegr/CarInputManager.cs +++ b/U3D_DrivingSystem/Assets/Script/Manaegr/CarInputManager.cs @@ -19,7 +19,9 @@ namespace Script.Manaegr public AnimationController ygq; - + public GameObject[] shache; + + private bool isYgq = false; public void Init() @@ -45,11 +47,19 @@ namespace Script.Manaegr { turnSignalController.SetSignal(2); } - + if (Input.GetKeyDown(KeyCode.Space)) + { + turnSignalController.SetSignal(0); + } //切换车内视角 if (Input.GetKeyDown(KeyCode.U)) { + for (int i = 0; i < shache.Length; i++) + { + shache[i].SetActive(false); + } + if (cam1.activeInHierarchy) { cam1.SetActive(false);