diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..ddb6ff8 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..da60e25 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Unity", + "type": "vstuc", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4f0fdb8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,60 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.vs": true, + "**/.gitmodules": true, + "**/.vsconfig": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "Logs/": true, + "logs/": true, + "ProjectSettings/": true, + "UserSettings/": true, + "temp/": true, + "Temp/": true + }, + "dotnet.defaultSolution": "Let-Him-Cook.sln" +} \ No newline at end of file diff --git a/Assets/Scenes/Noahs kælder.unity b/Assets/Scenes/Noahs kælder.unity index 862bccf..c88ef41 100644 --- a/Assets/Scenes/Noahs kælder.unity +++ b/Assets/Scenes/Noahs kælder.unity @@ -311,6 +311,90 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &228737563 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 228737564} + - component: {fileID: 228737565} + m_Layer: 0 + m_Name: CookButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &228737564 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 228737563} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -1} + m_LocalScale: {x: 0, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1517788315} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &228737565 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 228737563} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &389679690 GameObject: m_ObjectHideFlags: 0 @@ -555,13 +639,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 460072661} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 4, y: 0, z: 0} + m_LocalRotation: {x: -0, y: -0, z: 0.011939, w: -0.9999287} + m_LocalPosition: {x: 4.06, y: 0.01, z: 0} m_LocalScale: {x: 2, y: 2, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1325490341} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -1.368} --- !u!1 &537514707 GameObject: m_ObjectHideFlags: 0 @@ -642,7 +726,7 @@ Transform: m_GameObject: {fileID: 537514707} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.19, y: -0.12, z: 0} + m_LocalPosition: {x: 12.08, y: -4.04, z: 0} m_LocalScale: {x: 2, y: 2, z: 2} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1033,7 +1117,7 @@ Transform: m_GameObject: {fileID: 867381650} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0.34, y: 0, z: 0} m_LocalScale: {x: 2, y: 2, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1134,7 +1218,7 @@ Transform: m_GameObject: {fileID: 885031692} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2.08, y: -0.27, z: 0} + m_LocalPosition: {x: 11.83, y: -2.66, z: 0} m_LocalScale: {x: 2, y: 2, z: 2} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1281,7 +1365,7 @@ Transform: m_GameObject: {fileID: 1001436608} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 4, y: 0, z: 0} + m_LocalPosition: {x: 11.03, y: -4.47, z: 0} m_LocalScale: {x: 2, y: 2, z: 2} m_ConstrainProportionsScale: 0 m_Children: [] @@ -2052,7 +2136,8 @@ Transform: m_LocalPosition: {x: -0.19, y: 3.03, z: 1} m_LocalScale: {x: 4.0825, y: 3.375, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 228737564} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1517788316 @@ -2067,6 +2152,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 84e0c3f7dac20fb428c544f192588d80, type: 3} m_Name: m_EditorClassIdentifier: + FinishedDishPosition: {x: -4.66, y: 2.89, z: 0} --- !u!50 &1517788317 Rigidbody2D: serializedVersion: 4 diff --git a/Assets/Scripts/CookButton.cs b/Assets/Scripts/CookButton.cs new file mode 100644 index 0000000..f3d5313 --- /dev/null +++ b/Assets/Scripts/CookButton.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CookButton : MonoBehaviour +{ + +} diff --git a/Assets/Scripts/CookButton.cs.meta b/Assets/Scripts/CookButton.cs.meta new file mode 100644 index 0000000..e0fed74 --- /dev/null +++ b/Assets/Scripts/CookButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30e28733a4100f84e806c42e84c6d4ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Cooking.cs b/Assets/Scripts/Cooking.cs index bd1bff5..83b126b 100644 --- a/Assets/Scripts/Cooking.cs +++ b/Assets/Scripts/Cooking.cs @@ -14,6 +14,8 @@ public class Cooking : MonoBehaviour // } + public Vector3 FinishedDishPosition; + void CreateDish() { List Ingredients = GetIngredients(); @@ -74,12 +76,19 @@ public class Cooking : MonoBehaviour } } - Debug.Log(BestDish.name); + // Remove ingredients and add the dish + foreach (GameObject Ingredient in Ingredients) { + Transform transform = Ingredient.GetComponent().transform; + transform.position = Vector3.up * 50; + } + + BestDish.transform.position = FinishedDishPosition; + } // Keep track of ingredients going on and off the cooker. - List currentCollisions = new List (); + List currentCollisions = new List (); private void OnTriggerEnter2D(Collider2D other) { currentCollisions.Add (other.gameObject); CreateDish(); diff --git a/Packages/manifest.json b/Packages/manifest.json index 5077cac..40c3510 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -3,7 +3,7 @@ "com.unity.collab-proxy": "2.2.0", "com.unity.feature.2d": "2.0.0", "com.unity.ide.rider": "3.0.24", - "com.unity.ide.visualstudio": "2.0.18", + "com.unity.ide.visualstudio": "2.0.22", "com.unity.test-framework": "1.1.33", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.7.5", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 202403f..45116dd 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -152,7 +152,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.18", + "version": "2.0.22", "depth": 0, "source": "registry", "dependencies": {