diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 67d9b7b..80b9699 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -63,6 +63,8 @@ + + @@ -70,6 +72,7 @@ + diff --git a/Assets/InputSystem_Actions.inputactions b/Assets/InputSystem_Actions.inputactions index e97303c..3c88953 100644 --- a/Assets/InputSystem_Actions.inputactions +++ b/Assets/InputSystem_Actions.inputactions @@ -1,4 +1,5 @@ { + "version": 1, "name": "InputSystem_Actions", "maps": [ { @@ -15,19 +16,10 @@ "initialStateCheck": true }, { - "name": "Look", - "type": "Value", - "id": "6b444451-8a00-4d00-a97e-f47457f736a8", - "expectedControlType": "Vector2", - "processors": "", - "interactions": "", - "initialStateCheck": true - }, - { - "name": "Attack", + "name": "Jump", "type": "Button", - "id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a", - "expectedControlType": "Button", + "id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -36,52 +28,7 @@ "name": "Interact", "type": "Button", "id": "852140f2-7766-474d-8707-702459ba45f3", - "expectedControlType": "Button", - "processors": "", - "interactions": "Hold", - "initialStateCheck": false - }, - { - "name": "Crouch", - "type": "Button", - "id": "27c5f898-bc57-4ee1-8800-db469aca5fe3", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Jump", - "type": "Button", - "id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Previous", - "type": "Button", - "id": "2776c80d-3c14-4091-8c56-d04ced07a2b0", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Next", - "type": "Button", - "id": "b7230bb6-fc9b-4f52-8b25-f5e19cb2c2ba", - "expectedControlType": "Button", - "processors": "", - "interactions": "", - "initialStateCheck": false - }, - { - "name": "Sprint", - "type": "Button", - "id": "641cd816-40e6-41b4-8c3d-04687c349290", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -220,160 +167,6 @@ "isComposite": false, "isPartOfComposite": false }, - { - "name": "", - "id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235", - "path": "/rightStick", - "interactions": "", - "processors": "", - "groups": ";Gamepad", - "action": "Look", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8c8e490b-c610-4785-884f-f04217b23ca4", - "path": "/delta", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse;Touch", - "action": "Look", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "3e5f5442-8668-4b27-a940-df99bad7e831", - "path": "/{Hatswitch}", - "interactions": "", - "processors": "", - "groups": "Joystick", - "action": "Look", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91", - "path": "/buttonWest", - "interactions": "", - "processors": "", - "groups": ";Gamepad", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "05f6913d-c316-48b2-a6bb-e225f14c7960", - "path": "/leftButton", - "interactions": "", - "processors": "", - "groups": ";Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "886e731e-7071-4ae4-95c0-e61739dad6fd", - "path": "/primaryTouch/tap", - "interactions": "", - "processors": "", - "groups": ";Touch", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54", - "path": "/trigger", - "interactions": "", - "processors": "", - "groups": "Joystick", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8255d333-5683-4943-a58a-ccb207ff1dce", - "path": "/{PrimaryAction}", - "interactions": "", - "processors": "", - "groups": "XR", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7", - "path": "/enter", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Attack", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed", - "path": "/2", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Next", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94", - "path": "/dpad/right", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Next", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "f2e9ba44-c423-42a7-ad56-f20975884794", - "path": "/leftShift", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Sprint", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6", - "path": "/leftStickPress", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Sprint", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba", - "path": "/trigger", - "interactions": "", - "processors": "", - "groups": "XR", - "action": "Sprint", - "isComposite": false, - "isPartOfComposite": false - }, { "name": "", "id": "eb40bb66-4559-4dfa-9a2f-820438abb426", @@ -407,28 +200,6 @@ "isComposite": false, "isPartOfComposite": false }, - { - "name": "", - "id": "1534dc16-a6aa-499d-9c3a-22b47347b52a", - "path": "/1", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Previous", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "25060bbd-a3a6-476e-8fba-45ae484aad05", - "path": "/dpad/left", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Previous", - "isComposite": false, - "isPartOfComposite": false - }, { "name": "", "id": "1c04ea5f-b012-41d1-a6f7-02e963b52893", @@ -450,28 +221,6 @@ "action": "Interact", "isComposite": false, "isPartOfComposite": false - }, - { - "name": "", - "id": "4f4649ac-64a8-4a73-af11-b3faef356a4d", - "path": "/buttonEast", - "interactions": "", - "processors": "", - "groups": "Gamepad", - "action": "Crouch", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a", - "path": "/c", - "interactions": "", - "processors": "", - "groups": "Keyboard&Mouse", - "action": "Crouch", - "isComposite": false, - "isPartOfComposite": false } ] }, @@ -492,7 +241,16 @@ "name": "Jump", "type": "Button", "id": "59f4f6f2-8b45-47e1-9d68-8f0d3c2d3d8c", - "expectedControlType": "Button", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Interact", + "type": "Button", + "id": "283e1c05-a179-47bd-bcfa-ac7847cd858a", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -520,6 +278,17 @@ "action": "Jump", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "e13957a5-1f20-4c0d-b7eb-2ba014bcea02", + "path": "/buttonEast", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Interact", + "isComposite": false, + "isPartOfComposite": false } ] }, @@ -1198,4 +967,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/Assets/Prefabs/Basket.prefab b/Assets/Prefabs/Basket.prefab new file mode 100644 index 0000000..7d154d2 --- /dev/null +++ b/Assets/Prefabs/Basket.prefab @@ -0,0 +1,137 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &2744651699810765668 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -2253911629886400664, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_Name + value: Basket + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalScale.x + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalScale.y + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalPosition.x + value: -4.47 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalPosition.y + value: -0.994 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: -2253911629886400664, guid: f38aee8caa1440842a40900c66c53167, type: 3} + insertIndex: -1 + addedObject: {fileID: 3704939715719136353} + - targetCorrespondingSourceObject: {fileID: -2253911629886400664, guid: f38aee8caa1440842a40900c66c53167, type: 3} + insertIndex: -1 + addedObject: {fileID: 1936276717514159485} + m_SourcePrefab: {fileID: -8435245712485981826, guid: f38aee8caa1440842a40900c66c53167, type: 3} +--- !u!1 &5093159401353337868 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: -2253911629886400664, guid: f38aee8caa1440842a40900c66c53167, type: 3} + m_PrefabInstance: {fileID: 2744651699810765668} + m_PrefabAsset: {fileID: 0} +--- !u!114 &3704939715719136353 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5093159401353337868} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bba2c7dd7c77e0a4ab1157bab0c5bd0f, type: 3} + m_Name: + m_EditorClassIdentifier: '::' + scoreManager: {fileID: 0} +--- !u!61 &1936276717514159485 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5093159401353337868} + m_Enabled: 1 + serializedVersion: 3 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_CompositeOperation: 0 + m_CompositeOrder: 0 + m_Offset: {x: 0, y: 0.185} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0} + oldSize: {x: 0.96, y: 0.37} + newSize: {x: 0.96, y: 0.37} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Size: {x: 0.96, y: 0.37} + m_EdgeRadius: 0 diff --git a/Assets/Prefabs/Basket.prefab.meta b/Assets/Prefabs/Basket.prefab.meta new file mode 100644 index 0000000..b146bd5 --- /dev/null +++ b/Assets/Prefabs/Basket.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 99cce68fc82caea44b5a140697be00a8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Experiment.unity b/Assets/Scenes/Experiment.unity index 5c8502a..f442550 100644 --- a/Assets/Scenes/Experiment.unity +++ b/Assets/Scenes/Experiment.unity @@ -119,6 +119,75 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &375061914 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 375061916} + - component: {fileID: 375061915} + - component: {fileID: 375061917} + m_Layer: 5 + m_Name: GameGUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &375061915 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 375061914} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument + m_PanelSettings: {fileID: 11400000, guid: 850db338bdc23ce4bb011b1e30c2d7fb, type: 2} + m_ParentUI: {fileID: 0} + sourceAsset: {fileID: 9197481963319205126, guid: 9d91f117ab4764144b50626c977dc8b2, type: 3} + m_SortingOrder: 0 + m_Position: 0 + m_WorldSpaceSizeMode: 1 + m_WorldSpaceWidth: 1920 + m_WorldSpaceHeight: 1080 + m_PivotReferenceSize: 0 + m_Pivot: 0 + m_WorldSpaceCollider: {fileID: 0} +--- !u!4 &375061916 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 375061914} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &375061917 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 375061914} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d6e51e2135855944dbc7ba0763ce1cba, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::ScoreManager + Score: 0 --- !u!1 &418512664 GameObject: m_ObjectHideFlags: 0 @@ -512,6 +581,7 @@ GameObject: - component: {fileID: 486463125} - component: {fileID: 486463124} - component: {fileID: 486463123} + - component: {fileID: 486463126} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -593,6 +663,50 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &486463126 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 486463122} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 + m_Version: 2 --- !u!1 &495541363 GameObject: m_ObjectHideFlags: 0 @@ -995,6 +1109,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 3659140714710275197, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: interactActionName + value: Interact + objectReference: {fileID: 0} - target: {fileID: 3937090937419967315, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} propertyPath: m_Name value: Player (1) @@ -1520,7 +1638,7 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1130768733 +--- !u!1001 &1227312797 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -1528,55 +1646,136 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: -2253911629886400664, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 3704939715719136353, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: scoreManager + value: + objectReference: {fileID: 375061917} + - target: {fileID: 5093159401353337868, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_Name + value: Basket (2) + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.x + value: 0.85096 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.y + value: 0.85096 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.z + value: 0.42548 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalPosition.x + value: 4.51 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalPosition.y + value: -0.97 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} +--- !u!1001 &1277412258 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3704939715719136353, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: scoreManager + value: + objectReference: {fileID: 375061917} + - target: {fileID: 5093159401353337868, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_Name value: Basket (1) objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalScale.x - value: 2 + value: 0.85096 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalScale.y - value: 2 + value: 0.85096 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.z + value: 0.42548 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalPosition.x - value: 4.47 + value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalPosition.y - value: -0.994 + value: 1 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} @@ -1584,72 +1783,7 @@ PrefabInstance: m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] - m_SourcePrefab: {fileID: -8435245712485981826, guid: f38aee8caa1440842a40900c66c53167, type: 3} ---- !u!1001 &1397916294 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: -2253911629886400664, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_Name - value: Basket - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalScale.x - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalScale.y - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalPosition.x - value: -4.47 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalPosition.y - value: -0.994 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7878350319992209165, guid: f38aee8caa1440842a40900c66c53167, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: -8435245712485981826, guid: f38aee8caa1440842a40900c66c53167, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} --- !u!1 &1466477811 GameObject: m_ObjectHideFlags: 0 @@ -1912,6 +2046,95 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1685410085 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalPosition.x + value: 2.3946345 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalPosition.y + value: -3.3612046 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3009946143020725610, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3659140714710275197, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: actionMapName + value: Player2 + objectReference: {fileID: 0} + - target: {fileID: 3659140714710275197, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: controlSchemeName + value: Gamepad + objectReference: {fileID: 0} + - target: {fileID: 3659140714710275197, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: interactActionName + value: Interact + objectReference: {fileID: 0} + - target: {fileID: 3937090937419967315, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_Name + value: Player (2) + objectReference: {fileID: 0} + - target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: moveSpeed + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: jumpImpulse + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: actionMapName + value: Player2 + objectReference: {fileID: 0} + - target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: controlSchemeName + value: Gamepad + objectReference: {fileID: 0} + - target: {fileID: 8276105153445234536, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} + propertyPath: m_GravityScale + value: 2 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 414ae949bae840c4589b38dd91c715e0, type: 3} --- !u!1 &1759124602 GameObject: m_ObjectHideFlags: 0 @@ -2280,6 +2503,79 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1760117322204329348 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3704939715719136353, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: scoreManager + value: + objectReference: {fileID: 375061917} + - target: {fileID: 5093159401353337868, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_Name + value: Basket + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.x + value: 0.76256 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.y + value: 0.76256 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalScale.z + value: 0.38128 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalPosition.x + value: -4.47 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalPosition.y + value: -0.95 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5423305860314887273, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 99cce68fc82caea44b5a140697be00a8, type: 3} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 @@ -2298,10 +2594,13 @@ SceneRoots: - {fileID: 477169536} - {fileID: 1518904088} - {fileID: 689117240} - - {fileID: 1397916294} - - {fileID: 1130768733} + - {fileID: 1760117322204329348} + - {fileID: 1277412258} + - {fileID: 1227312797} - {fileID: 1830238253} - {fileID: 908853550} - {fileID: 1466477813} - {fileID: 1759124604} - {fileID: 792686806} + - {fileID: 1685410085} + - {fileID: 375061916} diff --git a/Assets/Scripts/BasketController.cs b/Assets/Scripts/BasketController.cs new file mode 100644 index 0000000..4d67462 --- /dev/null +++ b/Assets/Scripts/BasketController.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +public class BasketController : MonoBehaviour +{ + public ScoreManager scoreManager; + + private void OnCollisionEnter2D(Collision2D collision) + { + Debug.Log("2D Solid hit with: " + collision.gameObject.name); + + if (collision.gameObject.CompareTag("Interactable")) + { + scoreManager.AddPoints(1); + + GameObject.Destroy(collision.gameObject); + } + } +} diff --git a/Assets/Scripts/BasketController.cs.meta b/Assets/Scripts/BasketController.cs.meta new file mode 100644 index 0000000..bb569a1 --- /dev/null +++ b/Assets/Scripts/BasketController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bba2c7dd7c77e0a4ab1157bab0c5bd0f \ No newline at end of file diff --git a/Assets/Scripts/ScoreManager.cs b/Assets/Scripts/ScoreManager.cs new file mode 100644 index 0000000..c98eda1 --- /dev/null +++ b/Assets/Scripts/ScoreManager.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using UnityEngine.UIElements; + +public class ScoreManager : MonoBehaviour +{ + public int Score = 0; + private Label _scoreLabel; + + public static System.Action OnScoreChanged; + + + public void AddPoints(int points) + { + Score += points; + UpdateScoreDisplay(); + Debug.Log("Score updated: " + Score); + } + + void OnEnable() + { + var root = GetComponent().rootVisualElement; + // Find your Label by name in the UXML + _scoreLabel = root.Q