From 44837c6c135176dc2c46a62d85dd2f3eeb2b4088 Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Wed, 1 Mar 2023 00:32:36 +1100 Subject: [PATCH] Move container logic to use inheritence and move logic around. Also fix the clear counter spawning items, next I'm going to implament the logic for placing food onto them instead. --- .erp | 2 +- Assets/BACKUPS.meta | 8 + Assets/BACKUPS/prefabs.meta | 8 + .../prefabs/ClearCounter_BACKUP.prefab | 328 ++++++++++++ .../prefabs/ClearCounter_BACKUP.prefab.meta | 7 + Assets/Prefabs/Counter/ClearCounter.prefab | 307 +++++------ .../Prefabs/Counter/ClearCounter.prefab.meta | 2 +- .../Prefabs/Counter/ContainerCounter.prefab | 408 +++++++++++++++ .../Counter/ContainerCounter.prefab.meta | 7 + Assets/Prefabs/Counter/_BaseCounter.prefab | 87 ++++ .../Prefabs/Counter/_BaseCounter.prefab.meta | 7 + Assets/Scenes/GaneScene.unity | 480 +++++++++++------- Assets/Scripts/BaseCounter.cs | 42 ++ Assets/Scripts/BaseCounter.cs.meta | 11 + Assets/Scripts/ClearCounter.cs | 41 +- Assets/Scripts/ContainerCounter.cs | 24 + Assets/Scripts/ContainerCounter.cs.meta | 11 + Assets/Scripts/ContainerCounterVisual.cs | 28 + Assets/Scripts/ContainerCounterVisual.cs.meta | 11 + Assets/Scripts/Player.cs | 38 +- Assets/Scripts/SelectedCounterVisual.cs | 18 +- 21 files changed, 1478 insertions(+), 397 deletions(-) create mode 100644 Assets/BACKUPS.meta create mode 100644 Assets/BACKUPS/prefabs.meta create mode 100644 Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab create mode 100644 Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab.meta create mode 100644 Assets/Prefabs/Counter/ContainerCounter.prefab create mode 100644 Assets/Prefabs/Counter/ContainerCounter.prefab.meta create mode 100644 Assets/Prefabs/Counter/_BaseCounter.prefab create mode 100644 Assets/Prefabs/Counter/_BaseCounter.prefab.meta create mode 100644 Assets/Scripts/BaseCounter.cs create mode 100644 Assets/Scripts/BaseCounter.cs.meta create mode 100644 Assets/Scripts/ContainerCounter.cs create mode 100644 Assets/Scripts/ContainerCounter.cs.meta create mode 100644 Assets/Scripts/ContainerCounterVisual.cs create mode 100644 Assets/Scripts/ContainerCounterVisual.cs.meta diff --git a/.erp b/.erp index 85f3ef0..c3ac799 100644 --- a/.erp +++ b/.erp @@ -5,7 +5,7 @@ false false true - 1677589653 + 1677600894 8006271043655199372 false \ No newline at end of file diff --git a/Assets/BACKUPS.meta b/Assets/BACKUPS.meta new file mode 100644 index 0000000..fee2703 --- /dev/null +++ b/Assets/BACKUPS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 576669fb6782ba64daa094f0d067b6a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BACKUPS/prefabs.meta b/Assets/BACKUPS/prefabs.meta new file mode 100644 index 0000000..2761fc0 --- /dev/null +++ b/Assets/BACKUPS/prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30511aabf5479ef46948317bfd790e7c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab b/Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab new file mode 100644 index 0000000..fda5b92 --- /dev/null +++ b/Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab @@ -0,0 +1,328 @@ +%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 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6371086230447438899} + - component: {fileID: 190913029279232345} + - component: {fileID: 7837983985068458341} + m_Layer: 6 + m_Name: ClearCounter_BACKUP + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6371086230447438899 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6869097019740516189} + m_LocalRotation: {x: -0, y: -0.999996, z: -0, w: -0.0028347075} + m_LocalPosition: {x: -0.000021893527, y: 0, z: 3.0077405} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3231759315905380366} + - {fileID: 4409201660398974582} + - {fileID: 1024188629140685204} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: -180.325, z: 0} +--- !u!65 &190913029279232345 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6869097019740516189} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1.5, y: 1.5, z: 1.5} + m_Center: {x: 0, y: 0.5, z: 0} +--- !u!114 &7837983985068458341 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6869097019740516189} + m_Enabled: 1 + m_EditorHideFlags: 0 + 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 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 6371086230447438899} + m_Modifications: + - target: {fileID: 3984833892277163771, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 1a0afd856a35421469b28b916116fd9c, type: 2} + - target: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_Name + value: Selected + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalScale.x + value: 1.01 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalScale.y + value: 1.01 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalScale.z + value: 1.01 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_ConstrainProportionsScale + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8489276541531669327, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + insertIndex: -1 + addedObject: {fileID: 6941436636027395465} + m_SourcePrefab: {fileID: 100100000, guid: 0004cb1e11ad014419b943c7da960724, type: 3} +--- !u!4 &4409201660398974582 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + m_PrefabInstance: {fileID: 180516218137596637} + m_PrefabAsset: {fileID: 0} +--- !u!1 &4409201660398974583 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + m_PrefabInstance: {fileID: 180516218137596637} + m_PrefabAsset: {fileID: 0} +--- !u!114 &6941436636027395465 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4409201660398974583} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b8e4c74ab1ad4b4a8c3676f33904e52, type: 3} + m_Name: + m_EditorClassIdentifier: + clearCounter: {fileID: 7837983985068458341} + visualGameObject: {fileID: 8596996214292255122} +--- !u!1 &8596996214292255122 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8489276541531669327, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + m_PrefabInstance: {fileID: 180516218137596637} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1398491922627355813 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 6371086230447438899} + m_Modifications: + - target: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_Name + value: ClearCounter_Visual + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0004cb1e11ad014419b943c7da960724, type: 3} +--- !u!4 &3231759315905380366 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + m_PrefabInstance: {fileID: 1398491922627355813} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab.meta b/Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab.meta new file mode 100644 index 0000000..4496f61 --- /dev/null +++ b/Assets/BACKUPS/prefabs/ClearCounter_BACKUP.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f62bfcbfbc8097441a9fae9a02652a07 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Counter/ClearCounter.prefab b/Assets/Prefabs/Counter/ClearCounter.prefab index f4fd680..97289ae 100644 --- a/Assets/Prefabs/Counter/ClearCounter.prefab +++ b/Assets/Prefabs/Counter/ClearCounter.prefab @@ -1,115 +1,91 @@ %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 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6371086230447438899} - - component: {fileID: 190913029279232345} - - component: {fileID: 7837983985068458341} - m_Layer: 6 - m_Name: ClearCounter - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &6371086230447438899 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6869097019740516189} - m_LocalRotation: {x: -0, y: -0.999996, z: -0, w: -0.0028347075} - m_LocalPosition: {x: -0.000021893527, y: 0, z: 3.0077405} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 3231759315905380366} - - {fileID: 4409201660398974582} - - {fileID: 1024188629140685204} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: -180.325, z: 0} ---- !u!65 &190913029279232345 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6869097019740516189} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1.5, y: 1.5, z: 1.5} - m_Center: {x: 0, y: 0.5, z: 0} ---- !u!114 &7837983985068458341 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6869097019740516189} - m_Enabled: 1 - m_EditorHideFlags: 0 - 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 +--- !u!1001 &1734168299195426923 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: serializedVersion: 3 - m_TransformParent: {fileID: 6371086230447438899} + m_TransformParent: {fileID: 1005032900244154635} + m_Modifications: + - target: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_Name + value: ClearCounter_Visual + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0004cb1e11ad014419b943c7da960724, type: 3} +--- !u!4 &2855550335523753152 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + type: 3} + m_PrefabInstance: {fileID: 1734168299195426923} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2594104119648024423 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1005032900244154635} m_Modifications: - target: {fileID: 3984833892277163771, guid: 0004cb1e11ad014419b943c7da960724, type: 3} @@ -213,116 +189,155 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, type: 3} insertIndex: -1 - addedObject: {fileID: 6941436636027395465} + addedObject: {fileID: 2306022452363298275} m_SourcePrefab: {fileID: 100100000, guid: 0004cb1e11ad014419b943c7da960724, type: 3} ---- !u!4 &4409201660398974582 stripped +--- !u!4 &1995632245453493196 stripped Transform: m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, type: 3} - m_PrefabInstance: {fileID: 180516218137596637} + m_PrefabInstance: {fileID: 2594104119648024423} m_PrefabAsset: {fileID: 0} ---- !u!1 &4409201660398974583 stripped +--- !u!1 &1995632245453493197 stripped GameObject: m_CorrespondingSourceObject: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, type: 3} - m_PrefabInstance: {fileID: 180516218137596637} + m_PrefabInstance: {fileID: 2594104119648024423} m_PrefabAsset: {fileID: 0} ---- !u!114 &6941436636027395465 +--- !u!114 &2306022452363298275 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4409201660398974583} + m_GameObject: {fileID: 1995632245453493197} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 6b8e4c74ab1ad4b4a8c3676f33904e52, type: 3} m_Name: m_EditorClassIdentifier: - clearCounter: {fileID: 7837983985068458341} - visualGameObject: {fileID: 8596996214292255122} ---- !u!1 &8596996214292255122 stripped + baseCounter: {fileID: 4015805876386331469} + visualGameObjectArray: + - {fileID: 5895181103151592488} +--- !u!1 &5895181103151592488 stripped GameObject: m_CorrespondingSourceObject: {fileID: 8489276541531669327, guid: 0004cb1e11ad014419b943c7da960724, type: 3} - m_PrefabInstance: {fileID: 180516218137596637} + m_PrefabInstance: {fileID: 2594104119648024423} m_PrefabAsset: {fileID: 0} ---- !u!1001 &1398491922627355813 +--- !u!1001 &6167746977889097016 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: serializedVersion: 3 - m_TransformParent: {fileID: 6371086230447438899} + m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 4589716710238282922, guid: 0004cb1e11ad014419b943c7da960724, - type: 3} - propertyPath: m_Name - value: ClearCounter_Visual - objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: -0.0028347075 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0.999996 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: -180.325 objectReference: {fileID: 0} - - target: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 6869097019740516189, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_Name + value: ClearCounter + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 0004cb1e11ad014419b943c7da960724, type: 3} ---- !u!4 &3231759315905380366 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 0004cb1e11ad014419b943c7da960724, + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + insertIndex: -1 + addedObject: {fileID: 2855550335523753152} + - targetCorrespondingSourceObject: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1995632245453493196} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 6869097019740516189, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + insertIndex: -1 + addedObject: {fileID: 4015805876386331469} + m_SourcePrefab: {fileID: 100100000, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} +--- !u!1 &777946716258335333 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6869097019740516189, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} - m_PrefabInstance: {fileID: 1398491922627355813} + m_PrefabInstance: {fileID: 6167746977889097016} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4015805876386331469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 777946716258335333} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bb159edc225081c408fe7a01d52732e4, type: 3} + m_Name: + m_EditorClassIdentifier: + kitchenObjectSO: {fileID: 11400000, guid: 38de64e72d766a34c82d1ef83d41c98d, type: 2} + counterTopPoint: {fileID: 6606388211444700332} +--- !u!4 &1005032900244154635 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + m_PrefabInstance: {fileID: 6167746977889097016} + m_PrefabAsset: {fileID: 0} +--- !u!4 &6606388211444700332 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1024188629140685204, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + m_PrefabInstance: {fileID: 6167746977889097016} m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/Counter/ClearCounter.prefab.meta b/Assets/Prefabs/Counter/ClearCounter.prefab.meta index 4496f61..568a9c0 100644 --- a/Assets/Prefabs/Counter/ClearCounter.prefab.meta +++ b/Assets/Prefabs/Counter/ClearCounter.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f62bfcbfbc8097441a9fae9a02652a07 +guid: 1648f5f41e27c1f4c911be81b11bbbe5 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Prefabs/Counter/ContainerCounter.prefab b/Assets/Prefabs/Counter/ContainerCounter.prefab new file mode 100644 index 0000000..11d1996 --- /dev/null +++ b/Assets/Prefabs/Counter/ContainerCounter.prefab @@ -0,0 +1,408 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &1666840008337202292 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 8171482358337694812} + m_Modifications: + - target: {fileID: 4589716710238282922, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_Name + value: ContainerCounter_Visual + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4589716710238282922, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + insertIndex: -1 + addedObject: {fileID: 8223535455270862916} + m_SourcePrefab: {fileID: 100100000, guid: 9a9137fa2b035d34e881701d2c178192, type: 3} +--- !u!1 &2922903433846749406 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4589716710238282922, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 1666840008337202292} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8223535455270862916 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2922903433846749406} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ef4e04faf28bf8f4c9d9b6e814e5549d, type: 3} + m_Name: + m_EditorClassIdentifier: + containerCounter: {fileID: 4501890935261969996} +--- !u!4 &2922903433846749407 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 1666840008337202292} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2551371746698894059 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 8171482358337694812} + m_Modifications: + - target: {fileID: 102550813385737453, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 353237590725857035, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2298542010046885598, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 1a0afd856a35421469b28b916116fd9c, type: 2} + - target: {fileID: 4589716710238282922, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_Name + value: Selected + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalScale.x + value: 1.01 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalScale.y + value: 1.01 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalScale.z + value: 1.01 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5850129231471598083, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 1a0afd856a35421469b28b916116fd9c, type: 2} + - target: {fileID: 7638390755804248883, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 1a0afd856a35421469b28b916116fd9c, type: 2} + - target: {fileID: 7816906318471787887, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8143070647044102886, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8609693441769329850, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 1a0afd856a35421469b28b916116fd9c, type: 2} + m_RemovedComponents: [] + m_RemovedGameObjects: + - {fileID: 5261771210811040880, guid: 9a9137fa2b035d34e881701d2c178192, type: 3} + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4589716710238282922, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + insertIndex: -1 + addedObject: {fileID: 8824414468958554145} + m_SourcePrefab: {fileID: 100100000, guid: 9a9137fa2b035d34e881701d2c178192, type: 3} +--- !u!4 &2078895091238960704 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 4589716710238282923, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 2551371746698894059} + m_PrefabAsset: {fileID: 0} +--- !u!1 &2078895091238960705 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4589716710238282922, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 2551371746698894059} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8824414468958554145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2078895091238960705} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b8e4c74ab1ad4b4a8c3676f33904e52, type: 3} + m_Name: + m_EditorClassIdentifier: + baseCounter: {fileID: 4501890935261969996} + visualGameObjectArray: + - {fileID: 5698023248368824196} + - {fileID: 5938476088094998541} + - {fileID: 2850418621831910880} + - {fileID: 2451117624126103046} +--- !u!1 &2451117624126103046 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 102550813385737453, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 2551371746698894059} + m_PrefabAsset: {fileID: 0} +--- !u!1 &2850418621831910880 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 353237590725857035, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 2551371746698894059} + m_PrefabAsset: {fileID: 0} +--- !u!1 &5698023248368824196 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7816906318471787887, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 2551371746698894059} + m_PrefabAsset: {fileID: 0} +--- !u!1 &5938476088094998541 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8143070647044102886, guid: 9a9137fa2b035d34e881701d2c178192, + type: 3} + m_PrefabInstance: {fileID: 2551371746698894059} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &2957821255952453743 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalRotation.w + value: -0.0028347075 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalRotation.y + value: -0.999996 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.325 + objectReference: {fileID: 0} + - target: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6869097019740516189, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + propertyPath: m_Name + value: ContainerCounter + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + insertIndex: -1 + addedObject: {fileID: 2922903433846749407} + - targetCorrespondingSourceObject: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + insertIndex: -1 + addedObject: {fileID: 2078895091238960704} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 6869097019740516189, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + insertIndex: -1 + addedObject: {fileID: 4501890935261969996} + m_SourcePrefab: {fileID: 100100000, guid: 509501a557d1d0a45817fb7332917dd5, type: 3} +--- !u!4 &2826832177588179451 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1024188629140685204, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + m_PrefabInstance: {fileID: 2957821255952453743} + m_PrefabAsset: {fileID: 0} +--- !u!4 &8171482358337694812 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6371086230447438899, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + m_PrefabInstance: {fileID: 2957821255952453743} + m_PrefabAsset: {fileID: 0} +--- !u!1 &8529718303251676978 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 6869097019740516189, guid: 509501a557d1d0a45817fb7332917dd5, + type: 3} + m_PrefabInstance: {fileID: 2957821255952453743} + m_PrefabAsset: {fileID: 0} +--- !u!114 &4501890935261969996 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8529718303251676978} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 85e5fb2507b46314682f5d827a1eb8eb, type: 3} + m_Name: + m_EditorClassIdentifier: + counterTopPoint: {fileID: 2826832177588179451} + kitchenObjectSO: {fileID: 11400000, guid: 38de64e72d766a34c82d1ef83d41c98d, type: 2} diff --git a/Assets/Prefabs/Counter/ContainerCounter.prefab.meta b/Assets/Prefabs/Counter/ContainerCounter.prefab.meta new file mode 100644 index 0000000..1d836cc --- /dev/null +++ b/Assets/Prefabs/Counter/ContainerCounter.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 34917e8d9f63b894e8d0992b8b5063e0 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Counter/_BaseCounter.prefab b/Assets/Prefabs/Counter/_BaseCounter.prefab new file mode 100644 index 0000000..579282f --- /dev/null +++ b/Assets/Prefabs/Counter/_BaseCounter.prefab @@ -0,0 +1,87 @@ +%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 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6371086230447438899} + - component: {fileID: 190913029279232345} + m_Layer: 6 + m_Name: _BaseCounter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6371086230447438899 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6869097019740516189} + m_LocalRotation: {x: -0, y: -0.999996, z: -0, w: -0.0028347075} + m_LocalPosition: {x: -0.000021893527, y: 0, z: 3.0077405} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1024188629140685204} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: -180.325, z: 0} +--- !u!65 &190913029279232345 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6869097019740516189} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1.5, y: 1.5, z: 1.5} + m_Center: {x: 0, y: 0.5, z: 0} diff --git a/Assets/Prefabs/Counter/_BaseCounter.prefab.meta b/Assets/Prefabs/Counter/_BaseCounter.prefab.meta new file mode 100644 index 0000000..cb4ced0 --- /dev/null +++ b/Assets/Prefabs/Counter/_BaseCounter.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 509501a557d1d0a45817fb7332917dd5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/GaneScene.unity b/Assets/Scenes/GaneScene.unity index fc2b7b9..15cd96e 100644 --- a/Assets/Scenes/GaneScene.unity +++ b/Assets/Scenes/GaneScene.unity @@ -124,7 +124,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1001 &295568153 +--- !u!1001 &253451472 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 @@ -132,93 +132,71 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_RootOrder - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalPosition.x - value: -1.5000219 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalPosition.z - value: 3.0077405 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.w - value: -0.0028347075 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.y - value: -0.999996 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: -180.325 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6869097019740516189, guid: f62bfcbfbc8097441a9fae9a02652a07, + - target: {fileID: 777946716258335333, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} propertyPath: m_Name value: ClearCounter (1) objectReference: {fileID: 0} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} - propertyPath: testing + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalPosition.x + value: -1.5 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} - propertyPath: tomatoPrefab - value: - objectReference: {fileID: 2446150686974603219, guid: e82d081edc5e44c4b9e51b5b3d517a32, + propertyPath: m_LocalPosition.z + value: 3.5 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, + propertyPath: m_LocalRotation.w + value: -0.0028347075 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} - propertyPath: kitchenObjectSO - value: - objectReference: {fileID: 11400000, guid: 9a7cd1ad975e4124e9873832ba4af356, - type: 2} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} - propertyPath: secondClearCounter - value: - objectReference: {fileID: 1926678759} + propertyPath: m_LocalRotation.y + value: -0.999996 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.325 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: f62bfcbfbc8097441a9fae9a02652a07, type: 3} + m_SourcePrefab: {fileID: 100100000, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} --- !u!1 &330585543 GameObject: m_ObjectHideFlags: 0 @@ -390,18 +368,6 @@ MonoBehaviour: m_CameraActivatedEvent: m_PersistentCalls: m_Calls: [] ---- !u!114 &391596026 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - m_PrefabInstance: {fileID: 295568153} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bb159edc225081c408fe7a01d52732e4, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &408182761 GameObject: m_ObjectHideFlags: 0 @@ -526,7 +492,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!114 &410087042 MonoBehaviour: @@ -706,8 +672,87 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &773494251 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6056916892498732287, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 91e8fe3de9249fc44b7bdd8050062896, + type: 3} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalPosition.z + value: -5 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.w + value: -0.99999785 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0021043867 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -360.241 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8529718303251676978, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_Name + value: ContainerCounter (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 34917e8d9f63b894e8d0992b8b5063e0, type: 3} --- !u!1 &832575517 GameObject: m_ObjectHideFlags: 0 @@ -755,7 +800,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &974939165 GameObject: @@ -789,7 +834,7 @@ Transform: - {fileID: 1139635725} - {fileID: 408182762} m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &974939167 MonoBehaviour: @@ -1050,20 +1095,160 @@ Transform: m_ConstrainProportionsScale: 1 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1926678759 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - m_PrefabInstance: {fileID: 8218183545890461205} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: bb159edc225081c408fe7a01d52732e4, type: 3} - m_Name: - m_EditorClassIdentifier: +--- !u!1001 &1545988673 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4501890935261969996, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: kitchenObjectSO + value: + objectReference: {fileID: 11400000, guid: 9a7cd1ad975e4124e9873832ba4af356, + type: 2} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalPosition.x + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalPosition.z + value: 3.5 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.w + value: -0.0028347075 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.y + value: -0.999996 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.325 + objectReference: {fileID: 0} + - target: {fileID: 8171482358337694812, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8529718303251676978, guid: 34917e8d9f63b894e8d0992b8b5063e0, + type: 3} + propertyPath: m_Name + value: ContainerCounter + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 34917e8d9f63b894e8d0992b8b5063e0, type: 3} +--- !u!1001 &1969259912 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 777946716258335333, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_Name + value: ClearCounter + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalPosition.z + value: 3.5 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalRotation.w + value: -0.0028347075 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalRotation.y + value: -0.999996 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -180.325 + objectReference: {fileID: 0} + - target: {fileID: 1005032900244154635, guid: 1648f5f41e27c1f4c911be81b11bbbe5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1648f5f41e27c1f4c911be81b11bbbe5, type: 3} --- !u!1 &2099865127 GameObject: m_ObjectHideFlags: 0 @@ -1134,94 +1319,5 @@ Transform: m_Children: - {fileID: 691696597} m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 46, y: 0, z: 0} ---- !u!1001 &8218183545890461205 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_RootOrder - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalPosition.x - value: -0.000021893527 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalPosition.z - value: 3.0077405 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.w - value: -0.0028347075 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.y - value: -0.999996 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: -180.325 - objectReference: {fileID: 0} - - target: {fileID: 6371086230447438899, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6869097019740516189, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: m_Name - value: ClearCounter - objectReference: {fileID: 0} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: testing - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: kitchenObjectSO - value: - objectReference: {fileID: 11400000, guid: 38de64e72d766a34c82d1ef83d41c98d, - type: 2} - - target: {fileID: 7837983985068458341, guid: f62bfcbfbc8097441a9fae9a02652a07, - type: 3} - propertyPath: secondClearCounter - value: - objectReference: {fileID: 391596026} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: f62bfcbfbc8097441a9fae9a02652a07, type: 3} diff --git a/Assets/Scripts/BaseCounter.cs b/Assets/Scripts/BaseCounter.cs new file mode 100644 index 0000000..22c5cd8 --- /dev/null +++ b/Assets/Scripts/BaseCounter.cs @@ -0,0 +1,42 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class BaseCounter : MonoBehaviour, IKitchenObjectParent +{ + + [SerializeField] private Transform counterTopPoint; + + private KitchenObject kitchenObject; + + public virtual void Interact(Player player) + { + Debug.LogError("BaseCounter.Interact();"); + } + + public Transform GetKitchenObjectFollowTransform() + { + return counterTopPoint; + } + + public void SetKitchenObject(KitchenObject kitchenObject) + { + this.kitchenObject = kitchenObject; + } + + public KitchenObject GetKitchenObject() + { + return kitchenObject; + } + + public void ClearKitchenObject() + { + kitchenObject = null; + } + + public bool HasKitchenObject() + { + return kitchenObject != null; + } + +} diff --git a/Assets/Scripts/BaseCounter.cs.meta b/Assets/Scripts/BaseCounter.cs.meta new file mode 100644 index 0000000..c29959d --- /dev/null +++ b/Assets/Scripts/BaseCounter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9e9dc0c79ee97d84e9fe3b4eb090bd76 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ClearCounter.cs b/Assets/Scripts/ClearCounter.cs index 3a9aceb..91d04bd 100644 --- a/Assets/Scripts/ClearCounter.cs +++ b/Assets/Scripts/ClearCounter.cs @@ -2,52 +2,15 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class ClearCounter : MonoBehaviour, IKitchenObjectParent +public class ClearCounter : BaseCounter { [SerializeField] private KitchenObjectSO kitchenObjectSO; - [SerializeField] private Transform counterTopPoint; - private KitchenObject kitchenObject; - - public void Interact(Player player) + public override void Interact(Player player) { - if (kitchenObject == null) - { - Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab, counterTopPoint); - kitchenObjectTransform.GetComponent().SetKitchenObjectParent(this); - } else - { - // Give object to player - kitchenObject.SetKitchenObjectParent(player); - } } - public Transform GetKitchenObjectFollowTransform() - { - return counterTopPoint; - } - - public void SetKitchenObject(KitchenObject kitchenObject) - { - this.kitchenObject = kitchenObject; - } - - public KitchenObject GetKitchenObject() - { - return kitchenObject; - } - - public void ClearKitchenObject() - { - kitchenObject = null; - } - - public bool HasKitchenObject() - { - return kitchenObject != null; - } - } diff --git a/Assets/Scripts/ContainerCounter.cs b/Assets/Scripts/ContainerCounter.cs new file mode 100644 index 0000000..d91b509 --- /dev/null +++ b/Assets/Scripts/ContainerCounter.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ContainerCounter : BaseCounter +{ + + public event EventHandler OnPlayerGrabbedObject; + + [SerializeField] private KitchenObjectSO kitchenObjectSO; + + public override void Interact(Player player) + { + if (!HasKitchenObject()) + { + Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab); + kitchenObjectTransform.GetComponent().SetKitchenObjectParent(player); + + OnPlayerGrabbedObject?.Invoke(this, EventArgs.Empty); + } + } + +} diff --git a/Assets/Scripts/ContainerCounter.cs.meta b/Assets/Scripts/ContainerCounter.cs.meta new file mode 100644 index 0000000..9efa909 --- /dev/null +++ b/Assets/Scripts/ContainerCounter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 85e5fb2507b46314682f5d827a1eb8eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ContainerCounterVisual.cs b/Assets/Scripts/ContainerCounterVisual.cs new file mode 100644 index 0000000..54e3bcb --- /dev/null +++ b/Assets/Scripts/ContainerCounterVisual.cs @@ -0,0 +1,28 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ContainerCounterVisual : MonoBehaviour +{ + + private const string OPEN_CLOSE = "OpenClose"; + + [SerializeField] private ContainerCounter containerCounter; + + private Animator animator; + + private void Awake() + { + animator = GetComponent(); + } + + private void Start() + { + containerCounter.OnPlayerGrabbedObject += ContainerCounter_OnPlayerGrabbedObject; + } + + private void ContainerCounter_OnPlayerGrabbedObject(object sender, System.EventArgs e) + { + animator.SetTrigger(OPEN_CLOSE); + } +} diff --git a/Assets/Scripts/ContainerCounterVisual.cs.meta b/Assets/Scripts/ContainerCounterVisual.cs.meta new file mode 100644 index 0000000..457f7b1 --- /dev/null +++ b/Assets/Scripts/ContainerCounterVisual.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef4e04faf28bf8f4c9d9b6e814e5549d +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 dc9b637..81a392c 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -12,7 +12,7 @@ public class Player : MonoBehaviour, IKitchenObjectParent public event EventHandler OnSelectedcounterChanged; public class OnSelectedCounterChangedEventArgs : EventArgs { - public ClearCounter selectedCounter; + public BaseCounter selectedCounter; } [SerializeField] private float moveSpeed = 7f; @@ -22,7 +22,7 @@ public class Player : MonoBehaviour, IKitchenObjectParent private bool isWalking; private Vector3 lastInteractDir; - private ClearCounter selectedCounter; + private BaseCounter selectedCounter; private KitchenObject kitchenObject; private void Start() @@ -67,7 +67,7 @@ public class Player : MonoBehaviour, IKitchenObjectParent Vector3 moveDir = new Vector3(inputVector.x, 0f, inputVector.y); - // Kepp a constantly updating record of the last move direction. + // Kepp a consistently updating record of the last move direction. // This means you can interact without holding down a direction. if (moveDir != Vector3.zero) { @@ -75,21 +75,25 @@ public class Player : MonoBehaviour, IKitchenObjectParent } float interactDistance = 2f; + // fire a raycast forward to search for objects in the countersLayerMask and output result to raycastHit if (Physics.Raycast(transform.position, lastInteractDir, out RaycastHit raycastHit, interactDistance, countersLayerMask)) { - if (raycastHit.transform.TryGetComponent(out ClearCounter clearCounter)) + // if the raycast hits an object of type BaseCounter + if (raycastHit.transform.TryGetComponent(out BaseCounter baseCounter)) { - // Has Clear Counter - if (clearCounter != selectedCounter) + // if selectedCounter is not equal to baseCounter update it + if (baseCounter != selectedCounter) { - SetSelectedCounter(clearCounter); + SetSelectedCounter(baseCounter); } } + // else if no BaseCounter was hit and selectedCounter isn't null then set it to null else if (selectedCounter != null) { SetSelectedCounter(null); } } + // else if no BaseCounter was hit and selectedCounter isn't null then set it to null else if (selectedCounter != null) { SetSelectedCounter(null); @@ -109,47 +113,57 @@ public class Player : MonoBehaviour, IKitchenObjectParent float moveDistance = moveSpeed * Time.deltaTime; float playerRadius = .7f; float playerHeight = 2f; + // fire a CapsuleCast (A 3D raycast in the shape of a capsule) to see if there is an object in the way of the player movement. bool canMove = !Physics.CapsuleCast(transform.position, transform.position + Vector3.up * playerHeight, playerRadius, moveDir, moveDistance); + // if the raycast hit something then this canMove is false and we attempt to move on eithery X or Z if (!canMove) { - // Cannot move towards moveDir + // cannot move towards moveDir - // Attempt only X move + // attempt only X move Vector3 moveDirX = new Vector3(moveDir.x, 0, 0).normalized; canMove = !Physics.CapsuleCast(transform.position, transform.position + Vector3.up * playerHeight, playerRadius, moveDirX, moveDistance); + // if able to move on X then change moveDir to X if (canMove) { moveDir = moveDirX; } else { - // Cannot move on X so attempt to move on Z + // cannot move on X so attempt to move on Z Vector3 moveDirZ = new Vector3(0, 0, moveDir.z).normalized; canMove = !Physics.CapsuleCast(transform.position, transform.position + Vector3.up * playerHeight, playerRadius, moveDirZ, moveDistance); + + // if able to move on Z then change moveDir to Z if (canMove) { moveDir = moveDirZ; } else { - // Cannot move at all + // cannot move at all so canMove is still false } } } + if (canMove) { + // add the time ajusted movement vector to current position which keep a consistent speed no matter the FPS transform.position += moveDir * moveDistance; } + // set isWalking to true if moveDir is not (0,0,0) isWalking = moveDir != Vector3.zero; float rotateSpeed = 10f; + // smothly rotate towards moveDir with a Slerp smoothed operation. + // Slerp is for like rotations while Lerp is for positions transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed); } - private void SetSelectedCounter(ClearCounter selectedCounter) + private void SetSelectedCounter(BaseCounter selectedCounter) { this.selectedCounter = selectedCounter; diff --git a/Assets/Scripts/SelectedCounterVisual.cs b/Assets/Scripts/SelectedCounterVisual.cs index ad08edb..376c8ba 100644 --- a/Assets/Scripts/SelectedCounterVisual.cs +++ b/Assets/Scripts/SelectedCounterVisual.cs @@ -5,8 +5,8 @@ using UnityEngine; public class SelectedCounterVisual : MonoBehaviour { - [SerializeField] private ClearCounter clearCounter; - [SerializeField] private GameObject visualGameObject; + [SerializeField] private BaseCounter baseCounter; + [SerializeField] private GameObject[] visualGameObjectArray; private void Start() { @@ -15,7 +15,7 @@ public class SelectedCounterVisual : MonoBehaviour private void Player_OnSelectedcounterChanged(object sender, Player.OnSelectedCounterChangedEventArgs e) { - if (e.selectedCounter == clearCounter) + if (e.selectedCounter == baseCounter) { Show(); } else @@ -25,12 +25,18 @@ public class SelectedCounterVisual : MonoBehaviour } private void Show() - { - visualGameObject.SetActive(true); + { + foreach (GameObject visualGameObject in visualGameObjectArray) + { + visualGameObject.SetActive(true); + } } private void Hide() { - visualGameObject.SetActive(false); + foreach (GameObject visualGameObject in visualGameObjectArray) + { + visualGameObject.SetActive(false); + } } }