diff --git a/Assets/Racing_Game/Data/Scripts/Car/Finish.cs b/Assets/Racing_Game/Data/Scripts/Car/Finish.cs index 24e33df9..5d361468 100644 --- a/Assets/Racing_Game/Data/Scripts/Car/Finish.cs +++ b/Assets/Racing_Game/Data/Scripts/Car/Finish.cs @@ -2,6 +2,7 @@ using TMPro; using Unity.VisualScripting; using UnityEngine; using UnityEngine.InputSystem; +using UnityEngine.UI; @@ -9,12 +10,17 @@ class Finish : MonoBehaviour { [SerializeField] private GameObject Effects1; [SerializeField] private GameObject Effects2; - [SerializeField] private GameObject WinMenu; [SerializeField] private PlayerInput Player1_Input; [SerializeField] private PlayerInput Player2_Input; + + [SerializeField] private GameObject WinMenu; + [SerializeField] private Button SelectedButton; [SerializeField] private TextMeshProUGUI WinText; + [SerializeField] private GameObject StripeActive; + + private void Start() { WinMenu.SetActive(false); @@ -60,9 +66,10 @@ class Finish : MonoBehaviour Effects1.SetActive(true); Effects2.SetActive(true); WinMenu.SetActive(true); + SelectedButton.Select(); + Player1_Input.enabled = false; Player2_Input.enabled = false; - } diff --git a/Assets/Racing_Game/Data/Scripts/ScriptRestart.cs b/Assets/Racing_Game/Data/Scripts/ScriptRestart.cs index 953f9a0f..10785fcf 100644 --- a/Assets/Racing_Game/Data/Scripts/ScriptRestart.cs +++ b/Assets/Racing_Game/Data/Scripts/ScriptRestart.cs @@ -8,6 +8,6 @@ public class ScriptRestart : MonoBehaviour /// public void Restart() { - SceneManager.LoadScene(SceneManager.GetActiveScene().name); + SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().name); } } diff --git a/Assets/Racing_Game/Prefabs.meta b/Assets/Racing_Game/Prefabs.meta new file mode 100644 index 00000000..82fa03e9 --- /dev/null +++ b/Assets/Racing_Game/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0b32224e57e3eb64e9892562d717ef64 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Racing_Game/Prefabs/Maps.meta b/Assets/Racing_Game/Prefabs/Maps.meta new file mode 100644 index 00000000..d93e8251 --- /dev/null +++ b/Assets/Racing_Game/Prefabs/Maps.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d277f6233b279304cbc93aaa5e50e06f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Racing_Game/Prefabs/Maps/1Map.meta b/Assets/Racing_Game/Prefabs/Maps/1Map.meta new file mode 100644 index 00000000..59f0c8bc --- /dev/null +++ b/Assets/Racing_Game/Prefabs/Maps/1Map.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f456449c3b306341989af7c85c8b38d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Racing_Game/UI/MapsUI/MiniMap(Player1).prefab b/Assets/Racing_Game/Prefabs/Maps/1Map/MiniMap(Player1).prefab similarity index 100% rename from Assets/Racing_Game/UI/MapsUI/MiniMap(Player1).prefab rename to Assets/Racing_Game/Prefabs/Maps/1Map/MiniMap(Player1).prefab diff --git a/Assets/Racing_Game/UI/MapsUI/MiniMap(Player1).prefab.meta b/Assets/Racing_Game/Prefabs/Maps/1Map/MiniMap(Player1).prefab.meta similarity index 100% rename from Assets/Racing_Game/UI/MapsUI/MiniMap(Player1).prefab.meta rename to Assets/Racing_Game/Prefabs/Maps/1Map/MiniMap(Player1).prefab.meta diff --git a/Assets/Racing_Game/Scence/Maps/1Map/FirstMap.unity b/Assets/Racing_Game/Scence/Maps/1Map/FirstMap.unity index 8e284066..06467095 100644 Binary files a/Assets/Racing_Game/Scence/Maps/1Map/FirstMap.unity and b/Assets/Racing_Game/Scence/Maps/1Map/FirstMap.unity differ diff --git a/Assets/Racing_Game/UI/MainUI/Animations/Buttons/Track-KIT.unitypackage.meta b/Assets/Racing_Game/UI/MainUI/Animations/Buttons/Track-KIT.unitypackage.meta new file mode 100644 index 00000000..39f2c38b --- /dev/null +++ b/Assets/Racing_Game/UI/MainUI/Animations/Buttons/Track-KIT.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0cd8157dcfbd7ea4686914e88dd0c837 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Racing_Game/UI/MapsUI/1Map.meta b/Assets/Racing_Game/UI/MapsUI/1Map.meta new file mode 100644 index 00000000..a0087815 --- /dev/null +++ b/Assets/Racing_Game/UI/MapsUI/1Map.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90862be0eecf332429f2886f06b7f73d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Racing_Game/UI/MapsUI/1Map/BackToMenuScript.cs b/Assets/Racing_Game/UI/MapsUI/1Map/BackToMenuScript.cs new file mode 100644 index 00000000..9446e3f6 --- /dev/null +++ b/Assets/Racing_Game/UI/MapsUI/1Map/BackToMenuScript.cs @@ -0,0 +1,10 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +public class BackToMenuScript : MonoBehaviour +{ + public void BackToMenu() + { + SceneManager.LoadSceneAsync(0); + } +} diff --git a/Assets/Racing_Game/UI/MapsUI/1Map/BackToMenuScript.cs.meta b/Assets/Racing_Game/UI/MapsUI/1Map/BackToMenuScript.cs.meta new file mode 100644 index 00000000..e82c7bf7 --- /dev/null +++ b/Assets/Racing_Game/UI/MapsUI/1Map/BackToMenuScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a6cf4a93e5b573347b5c8bab985edd59 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Racing_Game/UI/MapsUI/1Map/RestartScript.cs b/Assets/Racing_Game/UI/MapsUI/1Map/RestartScript.cs new file mode 100644 index 00000000..76479a92 --- /dev/null +++ b/Assets/Racing_Game/UI/MapsUI/1Map/RestartScript.cs @@ -0,0 +1,10 @@ +using UnityEngine; +using UnityEngine.SceneManagement; + +public class RestartScript : MonoBehaviour +{ + public void Restart() + { + SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().name); + } +} diff --git a/Assets/Racing_Game/UI/MapsUI/1Map/RestartScript.cs.meta b/Assets/Racing_Game/UI/MapsUI/1Map/RestartScript.cs.meta new file mode 100644 index 00000000..1d90f40e --- /dev/null +++ b/Assets/Racing_Game/UI/MapsUI/1Map/RestartScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e7c8fcb910efd4748877f85f86b6bb94 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RealisticCarControllerV3/Resources/test_rcc.inputactions b/Assets/RealisticCarControllerV3/Resources/test_rcc.inputactions index 7360a457..4e87b427 100644 --- a/Assets/RealisticCarControllerV3/Resources/test_rcc.inputactions +++ b/Assets/RealisticCarControllerV3/Resources/test_rcc.inputactions @@ -86,7 +86,40 @@ "isPartOfComposite": true }, { - "name": "gamepads", + "name": "Keyboard", + "id": "9194693b-7c4f-425d-8c96-f54db1eca8b7", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "Throttle", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "6c933367-c71d-44dd-abf8-0f71205c4259", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Throttle", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "14950296-ddfa-45da-a8a1-841dc23e7bed", + "path": "/w", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Throttle", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Gamepad", "id": "890eb4a4-7dfa-423d-b9dd-a5ba330c7482", "path": "2DVector", "interactions": "", @@ -102,7 +135,7 @@ "path": "/leftStick/left", "interactions": "", "processors": "", - "groups": "", + "groups": "Gamepad", "action": "Steering", "isComposite": false, "isPartOfComposite": true @@ -119,7 +152,40 @@ "isPartOfComposite": true }, { - "name": "1D Axis", + "name": "Keyboard", + "id": "2b119774-42e0-4af7-a6d0-f80ab7a1d792", + "path": "2DVector", + "interactions": "", + "processors": "", + "groups": "", + "action": "Steering", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "left", + "id": "c4725932-bf77-49b4-ae6a-f2a821af74f3", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Steering", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "7982cd98-2174-4ba5-9336-86444014708c", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Steering", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "Gamepad", "id": "7f8ea85c-3a52-47e3-865f-5f276f15d11b", "path": "1DAxis(minValue=0)", "interactions": "", @@ -135,7 +201,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "", + "groups": "Gamepad", "action": "Handbrake", "isComposite": false, "isPartOfComposite": true @@ -151,6 +217,39 @@ "isComposite": false, "isPartOfComposite": true }, + { + "name": "Keyboard", + "id": "d3e19a7d-ec2e-4908-bcfc-10ed6149e97a", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "Handbrake", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "c59d61e7-3a15-439d-87fa-8a59b5fe6437", + "path": "", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Handbrake", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "422064e0-3113-4666-b205-973375de75e0", + "path": "/space", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Handbrake", + "isComposite": false, + "isPartOfComposite": true + }, { "name": "Gamepad", "id": "14b1e5bd-e2a3-43d4-ace6-679f8a78c59c", @@ -168,7 +267,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "", + "groups": "Gamepad", "action": "NOS", "isComposite": false, "isPartOfComposite": true @@ -184,6 +283,39 @@ "isComposite": false, "isPartOfComposite": true }, + { + "name": "Keyboard", + "id": "57f4b081-cb98-4eb6-86ce-546b71291040", + "path": "1DAxis", + "interactions": "", + "processors": "", + "groups": "", + "action": "NOS", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "negative", + "id": "b78718e4-3099-4c95-bccc-023c98eae17d", + "path": "", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "NOS", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "positive", + "id": "ccc60a83-d82a-46f0-8cff-8010f269dbe4", + "path": "/leftShift", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "NOS", + "isComposite": false, + "isPartOfComposite": true + }, { "name": "", "id": "4d4b1ec5-f611-47d6-a6d3-f6d3ac447c79", @@ -194,6 +326,17 @@ "action": "Menu", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "efa8503e-718f-4af5-88c0-6f866190c68e", + "path": "/escape", + "interactions": "", + "processors": "", + "groups": "Keyboard", + "action": "Menu", + "isComposite": false, + "isPartOfComposite": false } ] } @@ -209,6 +352,17 @@ "isOR": false } ] + }, + { + "name": "Keyboard", + "bindingGroup": "Keyboard", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] } ] } \ No newline at end of file