diff --git a/.erp b/.erp
index d0700a8..448003f 100644
--- a/.erp
+++ b/.erp
@@ -5,7 +5,7 @@
false
false
true
- 1677527499
+ 1677533527
522683637854076046
false
\ No newline at end of file
diff --git a/Assets/Prefabs/Counter.meta b/Assets/Prefabs/Counter.meta
new file mode 100644
index 0000000..f65dc18
--- /dev/null
+++ b/Assets/Prefabs/Counter.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 92809d74bcd104747a16a523980f3e3c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Prefabs/ClearCounter.prefab b/Assets/Prefabs/Counter/ClearCounter.prefab
similarity index 90%
rename from Assets/Prefabs/ClearCounter.prefab
rename to Assets/Prefabs/Counter/ClearCounter.prefab
index 00d51cc..f4fd680 100644
--- a/Assets/Prefabs/ClearCounter.prefab
+++ b/Assets/Prefabs/Counter/ClearCounter.prefab
@@ -1,5 +1,36 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &5911868891692506302
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1024188629140685204}
+ m_Layer: 0
+ m_Name: CounterTopPoint
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1024188629140685204
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5911868891692506302}
+ m_LocalRotation: {x: -0, y: 0.999996, z: -0, w: -0.0028347075}
+ m_LocalPosition: {x: 0, y: 1.3, z: 0}
+ m_LocalScale: {x: 0.99999976, y: 1, z: 0.99999976}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 6371086230447438899}
+ m_RootOrder: -1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6869097019740516189
GameObject:
m_ObjectHideFlags: 0
@@ -32,6 +63,7 @@ Transform:
m_Children:
- {fileID: 3231759315905380366}
- {fileID: 4409201660398974582}
+ - {fileID: 1024188629140685204}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: -180.325, z: 0}
@@ -68,6 +100,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bb159edc225081c408fe7a01d52732e4, type: 3}
m_Name:
m_EditorClassIdentifier:
+ tomatoPrefab: {fileID: 2446150686974603219, guid: cb38d4874f4f7c34e85414e72902704c,
+ type: 3}
+ counterTopPoint: {fileID: 1024188629140685204}
--- !u!1001 &180516218137596637
PrefabInstance:
m_ObjectHideFlags: 0
diff --git a/Assets/Prefabs/ClearCounter.prefab.meta b/Assets/Prefabs/Counter/ClearCounter.prefab.meta
similarity index 100%
rename from Assets/Prefabs/ClearCounter.prefab.meta
rename to Assets/Prefabs/Counter/ClearCounter.prefab.meta
diff --git a/Assets/Prefabs/KitchenObjects.meta b/Assets/Prefabs/KitchenObjects.meta
new file mode 100644
index 0000000..7d5f018
--- /dev/null
+++ b/Assets/Prefabs/KitchenObjects.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d7d2dfe523922f345800b86ce66ebc30
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Prefabs/KitchenObjects/CheeseBlock.prefab b/Assets/Prefabs/KitchenObjects/CheeseBlock.prefab
new file mode 100644
index 0000000..3ce9298
--- /dev/null
+++ b/Assets/Prefabs/KitchenObjects/CheeseBlock.prefab
@@ -0,0 +1,127 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &8716210818090012050
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2446150686974603219}
+ - component: {fileID: -8299940418309216015}
+ m_Layer: 0
+ m_Name: CheeseBlock
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &2446150686974603219
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8716210818090012050}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -2.54, y: 0, z: 1.47}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 5111148839058365299}
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &-8299940418309216015
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8716210818090012050}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 9f604455b7aeb5f4790263b920c04313, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ kitchenObjectSO: {fileID: 11400000, guid: 9a7cd1ad975e4124e9873832ba4af356, type: 2}
+--- !u!1001 &8215829888142265843
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 2446150686974603219}
+ m_Modifications:
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_RootOrder
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226177, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ propertyPath: m_Name
+ value: CheeseBlock_Visual
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 44325c67017631342b5f02792113e57b, type: 3}
+--- !u!4 &5111148839058365299 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: 3812876574508226176, guid: 44325c67017631342b5f02792113e57b,
+ type: 3}
+ m_PrefabInstance: {fileID: 8215829888142265843}
+ m_PrefabAsset: {fileID: 0}
diff --git a/Assets/Prefabs/KitchenObjects/CheeseBlock.prefab.meta b/Assets/Prefabs/KitchenObjects/CheeseBlock.prefab.meta
new file mode 100644
index 0000000..a99dfdd
--- /dev/null
+++ b/Assets/Prefabs/KitchenObjects/CheeseBlock.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: e82d081edc5e44c4b9e51b5b3d517a32
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Prefabs/KitchenObjects/Tomato.prefab b/Assets/Prefabs/KitchenObjects/Tomato.prefab
new file mode 100644
index 0000000..2e65e3a
--- /dev/null
+++ b/Assets/Prefabs/KitchenObjects/Tomato.prefab
@@ -0,0 +1,127 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &8716210818090012050
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2446150686974603219}
+ - component: {fileID: 5792615824413011753}
+ m_Layer: 0
+ m_Name: Tomato
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &2446150686974603219
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8716210818090012050}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -2.54, y: 0, z: 1.47}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 7776824414934913256}
+ m_Father: {fileID: 0}
+ m_RootOrder: 9
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &5792615824413011753
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8716210818090012050}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 9f604455b7aeb5f4790263b920c04313, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ kitchenObjectSO: {fileID: 11400000, guid: 9a7cd1ad975e4124e9873832ba4af356, type: 2}
+--- !u!1001 &6847401699804399208
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ serializedVersion: 3
+ m_TransformParent: {fileID: 2446150686974603219}
+ m_Modifications:
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_RootOrder
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalEulerAnglesHint.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_LocalEulerAnglesHint.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 3812876574508226177, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ propertyPath: m_Name
+ value: Tomato_Visual
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_RemovedGameObjects: []
+ m_AddedGameObjects: []
+ m_AddedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 81e9fe7b3cd084242a088e945f531f38, type: 3}
+--- !u!4 &7776824414934913256 stripped
+Transform:
+ m_CorrespondingSourceObject: {fileID: 3812876574508226176, guid: 81e9fe7b3cd084242a088e945f531f38,
+ type: 3}
+ m_PrefabInstance: {fileID: 6847401699804399208}
+ m_PrefabAsset: {fileID: 0}
diff --git a/Assets/Prefabs/KitchenObjects/Tomato.prefab.meta b/Assets/Prefabs/KitchenObjects/Tomato.prefab.meta
new file mode 100644
index 0000000..783685b
--- /dev/null
+++ b/Assets/Prefabs/KitchenObjects/Tomato.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: cb38d4874f4f7c34e85414e72902704c
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/GaneScene.unity b/Assets/Scenes/GaneScene.unity
index 5c42f16..b754af7 100644
--- a/Assets/Scenes/GaneScene.unity
+++ b/Assets/Scenes/GaneScene.unity
@@ -192,6 +192,18 @@ PrefabInstance:
propertyPath: m_Name
value: ClearCounter (1)
objectReference: {fileID: 0}
+ - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07,
+ type: 3}
+ propertyPath: tomatoPrefab
+ value:
+ objectReference: {fileID: 2446150686974603219, guid: e82d081edc5e44c4b9e51b5b3d517a32,
+ type: 3}
+ - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07,
+ type: 3}
+ propertyPath: kitchenObjectSO
+ value:
+ objectReference: {fileID: 11400000, guid: 9a7cd1ad975e4124e9873832ba4af356,
+ type: 2}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -1125,6 +1137,12 @@ PrefabInstance:
propertyPath: m_Name
value: ClearCounter
objectReference: {fileID: 0}
+ - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07,
+ type: 3}
+ propertyPath: kitchenObjectSO
+ value:
+ objectReference: {fileID: 11400000, guid: 38de64e72d766a34c82d1ef83d41c98d,
+ type: 2}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
diff --git a/Assets/ScriptableObjects.meta b/Assets/ScriptableObjects.meta
new file mode 100644
index 0000000..e130dc1
--- /dev/null
+++ b/Assets/ScriptableObjects.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5f71807e5f9a32b4faac784358d757c0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/ScriptableObjects/KitchenObjectSO.meta b/Assets/ScriptableObjects/KitchenObjectSO.meta
new file mode 100644
index 0000000..313a1a5
--- /dev/null
+++ b/Assets/ScriptableObjects/KitchenObjectSO.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c672e7ced7bf0884faf9668be9b31cab
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/ScriptableObjects/KitchenObjectSO/CheeseBlock.asset b/Assets/ScriptableObjects/KitchenObjectSO/CheeseBlock.asset
new file mode 100644
index 0000000..aba9c7b
--- /dev/null
+++ b/Assets/ScriptableObjects/KitchenObjectSO/CheeseBlock.asset
@@ -0,0 +1,17 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 28f8f75e2d4dcd44a882af312f45cc94, type: 3}
+ m_Name: CheeseBlock
+ m_EditorClassIdentifier:
+ prefab: {fileID: 2446150686974603219, guid: e82d081edc5e44c4b9e51b5b3d517a32, type: 3}
+ sprite: {fileID: 21300000, guid: da2d04fe27b94e34ea0b624569b48a6f, type: 3}
+ objectName: CheeseBlock
diff --git a/Assets/ScriptableObjects/KitchenObjectSO/CheeseBlock.asset.meta b/Assets/ScriptableObjects/KitchenObjectSO/CheeseBlock.asset.meta
new file mode 100644
index 0000000..7df2a79
--- /dev/null
+++ b/Assets/ScriptableObjects/KitchenObjectSO/CheeseBlock.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9a7cd1ad975e4124e9873832ba4af356
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/ScriptableObjects/KitchenObjectSO/Tomato.asset b/Assets/ScriptableObjects/KitchenObjectSO/Tomato.asset
new file mode 100644
index 0000000..cb9d2ad
--- /dev/null
+++ b/Assets/ScriptableObjects/KitchenObjectSO/Tomato.asset
@@ -0,0 +1,17 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 28f8f75e2d4dcd44a882af312f45cc94, type: 3}
+ m_Name: Tomato
+ m_EditorClassIdentifier:
+ prefab: {fileID: 2446150686974603219, guid: cb38d4874f4f7c34e85414e72902704c, type: 3}
+ sprite: {fileID: 21300000, guid: 91e8fe3de9249fc44b7bdd8050062896, type: 3}
+ objectName: Tomato
diff --git a/Assets/ScriptableObjects/KitchenObjectSO/Tomato.asset.meta b/Assets/ScriptableObjects/KitchenObjectSO/Tomato.asset.meta
new file mode 100644
index 0000000..2f9ed23
--- /dev/null
+++ b/Assets/ScriptableObjects/KitchenObjectSO/Tomato.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 38de64e72d766a34c82d1ef83d41c98d
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/ClearCounter.cs b/Assets/Scripts/ClearCounter.cs
index 112c421..f2e5bb1 100644
--- a/Assets/Scripts/ClearCounter.cs
+++ b/Assets/Scripts/ClearCounter.cs
@@ -3,9 +3,18 @@ using UnityEngine;
public class ClearCounter : MonoBehaviour
{
+ [SerializeField] private KitchenObjectSO kitchenObjectSO;
+ [SerializeField] private Transform counterTopPoint;
+
public void Interact()
{
Debug.Log("Interacted!");
+
+ Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab, counterTopPoint);
+
+ kitchenObjectTransform.localPosition = Vector3.zero;
+
+ Debug.Log(kitchenObjectTransform.GetComponent().GetKitchenObjectSO().objectName);
}
}
diff --git a/Assets/Scripts/KitchenObject.cs b/Assets/Scripts/KitchenObject.cs
new file mode 100644
index 0000000..273707f
--- /dev/null
+++ b/Assets/Scripts/KitchenObject.cs
@@ -0,0 +1,12 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class KitchenObject : MonoBehaviour
+{
+
+ [SerializeField] private KitchenObjectSO kitchenObjectSO;
+
+ public KitchenObjectSO GetKitchenObjectSO() { return kitchenObjectSO; }
+
+}
diff --git a/Assets/Scripts/KitchenObject.cs.meta b/Assets/Scripts/KitchenObject.cs.meta
new file mode 100644
index 0000000..a38f878
--- /dev/null
+++ b/Assets/Scripts/KitchenObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9f604455b7aeb5f4790263b920c04313
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/KitchenObjectSO.cs b/Assets/Scripts/KitchenObjectSO.cs
new file mode 100644
index 0000000..8bde1ac
--- /dev/null
+++ b/Assets/Scripts/KitchenObjectSO.cs
@@ -0,0 +1,13 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+[CreateAssetMenu()]
+public class KitchenObjectSO : ScriptableObject
+{
+
+ public Transform prefab;
+ public Sprite sprite;
+ public string objectName;
+
+}
diff --git a/Assets/Scripts/KitchenObjectSO.cs.meta b/Assets/Scripts/KitchenObjectSO.cs.meta
new file mode 100644
index 0000000..6be554b
--- /dev/null
+++ b/Assets/Scripts/KitchenObjectSO.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 28f8f75e2d4dcd44a882af312f45cc94
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs
index 3567cd3..e06fcf2 100644
--- a/Assets/Scripts/Player.cs
+++ b/Assets/Scripts/Player.cs
@@ -81,12 +81,12 @@ public class Player : MonoBehaviour
SetSelectedCounter(clearCounter);
}
}
- else
+ else if (selectedCounter != null)
{
SetSelectedCounter(null);
}
}
- else
+ else if (selectedCounter != null)
{
SetSelectedCounter(null);
}