From f5b35c6516b81c4d4bb56a0095cae4af0684fb88 Mon Sep 17 00:00:00 2001 From: Daniel Tyomin Date: Mon, 19 Aug 2024 23:43:05 +0200 Subject: [PATCH] More tuning --- Assets/Data/Objectives/Level 2.asset | 8 +- Assets/Data/Types/Boxed E.asset | 4 +- Assets/Data/Types/Produced E.asset | 2 +- Assets/Materials/black.mat | 83 +++++ Assets/Materials/black.mat.meta | 8 + .../Conveyor/Conveyor Segment V2.prefab | 4 +- .../Conveyor/Product Converter 1.prefab | 87 +++++ .../Prefabs/Conveyor/Product Spawner.prefab | 323 +++++++++++++++++- Assets/Scenes/Main.unity | 60 +++- Assets/Scripts/Machines/Converter.cs | 15 +- Assets/Scripts/Machines/ProductSpawner.cs | 3 + 11 files changed, 566 insertions(+), 31 deletions(-) create mode 100644 Assets/Materials/black.mat create mode 100644 Assets/Materials/black.mat.meta diff --git a/Assets/Data/Objectives/Level 2.asset b/Assets/Data/Objectives/Level 2.asset index 7d9a96f..e939ae5 100644 --- a/Assets/Data/Objectives/Level 2.asset +++ b/Assets/Data/Objectives/Level 2.asset @@ -14,12 +14,12 @@ MonoBehaviour: m_EditorClassIdentifier: Stage: 2 Quotas: - - Type: {fileID: 11400000, guid: 42240b227563f074aa0dd8fee3c0cb35, type: 2} + - Type: {fileID: 11400000, guid: 6f11438f5cec6a24cb2a32fccc6244d1, type: 2} Quantity: 40 - MaxDefectCount: 0 + MaxDefectivePercentage: 25 - Type: {fileID: 11400000, guid: 1e626f6e0e642b44aaeb77b6628c8be7, type: 2} - Quantity: 10 - MaxDefectCount: 0 + Quantity: 15 + MaxDefectivePercentage: 25 TimeLimit: 180 LevelMessage: We are pleased to announce that we have secured the capital for the expansion. diff --git a/Assets/Data/Types/Boxed E.asset b/Assets/Data/Types/Boxed E.asset index c7e6716..c9f9c46 100644 --- a/Assets/Data/Types/Boxed E.asset +++ b/Assets/Data/Types/Boxed E.asset @@ -14,7 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: Prefab: {fileID: 4275785426082247918, guid: b4f4c7d91f7d6bc4ebc212f3d2bb13ef, type: 3} normalClips: - - {fileID: 8300000, guid: 8f2502b0ea356614faad568cc2ce8d28, type: 3} + - {fileID: 8300000, guid: 9a6a34ed8fef73c49ba83ab5c792877b, type: 3} defectiveClips: - - {fileID: 8300000, guid: 8f2502b0ea356614faad568cc2ce8d28, type: 3} + - {fileID: 8300000, guid: 9a6a34ed8fef73c49ba83ab5c792877b, type: 3} DefectProbabilities: [] diff --git a/Assets/Data/Types/Produced E.asset b/Assets/Data/Types/Produced E.asset index 74a73e0..bbccac2 100644 --- a/Assets/Data/Types/Produced E.asset +++ b/Assets/Data/Types/Produced E.asset @@ -14,7 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: Prefab: {fileID: 4275785426082247918, guid: 14d16caaceafb634f87449e796c4543a, type: 3} normalClips: - - {fileID: 8300000, guid: 8f2502b0ea356614faad568cc2ce8d28, type: 3} + - {fileID: 8300000, guid: 9a6a34ed8fef73c49ba83ab5c792877b, type: 3} defectiveClips: - {fileID: 8300000, guid: cb37dba8505a887438f4e1c8182106a0, type: 3} DefectProbabilities: diff --git a/Assets/Materials/black.mat b/Assets/Materials/black.mat new file mode 100644 index 0000000..8d95f0a --- /dev/null +++ b/Assets/Materials/black.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: black + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/black.mat.meta b/Assets/Materials/black.mat.meta new file mode 100644 index 0000000..d94362f --- /dev/null +++ b/Assets/Materials/black.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d645f16fd0af5c468c6359bb6db8009 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Conveyor/Conveyor Segment V2.prefab b/Assets/Prefabs/Conveyor/Conveyor Segment V2.prefab index 12c8a9a..5392e5a 100644 --- a/Assets/Prefabs/Conveyor/Conveyor Segment V2.prefab +++ b/Assets/Prefabs/Conveyor/Conveyor Segment V2.prefab @@ -1371,7 +1371,7 @@ AudioSource: OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 8300000, guid: 07668ba2dee122144a01b9d9872664e4, type: 3} m_PlayOnAwake: 1 - m_Volume: 0.3 + m_Volume: 0.2 m_Pitch: 1 Loop: 1 Mute: 0 @@ -1379,7 +1379,7 @@ AudioSource: SpatializePostEffects: 0 Priority: 128 DopplerLevel: 1 - MinDistance: 2 + MinDistance: 2.5 MaxDistance: 500 Pan2D: 0 rolloffMode: 0 diff --git a/Assets/Prefabs/Conveyor/Product Converter 1.prefab b/Assets/Prefabs/Conveyor/Product Converter 1.prefab index f0908cb..e2ad104 100644 --- a/Assets/Prefabs/Conveyor/Product Converter 1.prefab +++ b/Assets/Prefabs/Conveyor/Product Converter 1.prefab @@ -31,6 +31,89 @@ Transform: m_Children: [] m_Father: {fileID: 5260530439957074424} m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} +--- !u!1 &1023547921059417941 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6970548721017808975} + - component: {fileID: 8769135793327025743} + - component: {fileID: 1061916809796894142} + m_Layer: 0 + m_Name: Darkness + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &6970548721017808975 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1023547921059417941} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.125, y: 0.1875, z: 0} + m_LocalScale: {x: 1.3391137, y: 1.625, z: 2.037825} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8206931719697506044} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8769135793327025743 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1023547921059417941} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1061916809796894142 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1023547921059417941} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4d645f16fd0af5c468c6359bb6db8009, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!1 &1367073401673745372 GameObject: m_ObjectHideFlags: 0 @@ -333,6 +416,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7643959459257724000} + - {fileID: 6970548721017808975} - {fileID: 6621947266374772920} - {fileID: 2176528733310678998} - {fileID: 7419161432905911980} @@ -398,6 +482,8 @@ MonoBehaviour: MaxHealth: 5 conversionDuration: 2 conversionClip: {fileID: 8300000, guid: 470cbdb0b0814004e999ee2afb58e46c, type: 3} + enterClip: {fileID: 8300000, guid: db4886d0817a87d46a5897185b89a944, type: 3} + launchClip: {fileID: 8300000, guid: a94b638e33b82db4082ac18c2f7842be, type: 3} refuseLauncher: {fileID: 5841623345049199340} launchPower: 7 --- !u!65 &2626749768300218648 @@ -464,6 +550,7 @@ MonoBehaviour: PossibleOrientations: - {fileID: 6557417266349966768} yRotation: {x: -10, y: 10} + spawnClip: {fileID: 0} --- !u!1 &7122150010889803902 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Conveyor/Product Spawner.prefab b/Assets/Prefabs/Conveyor/Product Spawner.prefab index a9d8656..3d757d4 100644 --- a/Assets/Prefabs/Conveyor/Product Spawner.prefab +++ b/Assets/Prefabs/Conveyor/Product Spawner.prefab @@ -64,6 +64,9 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4012788816120753954} + - {fileID: 7621548840300707857} + - {fileID: 3822625298225933305} + - {fileID: 2943134841320330816} - {fileID: 170975714801783006} - {fileID: 2447222251883083429} m_Father: {fileID: 0} @@ -131,6 +134,7 @@ MonoBehaviour: PossibleOrientations: - {fileID: 2447222251883083429} yRotation: {x: -10, y: 10} + spawnClip: {fileID: 8300000, guid: 41f813f9ff2f32d40822f67b80c0fbab, type: 3} --- !u!1 &4554871642566179801 GameObject: m_ObjectHideFlags: 0 @@ -159,8 +163,8 @@ Transform: m_GameObject: {fileID: 4554871642566179801} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.25, y: 1.25, z: 1.25} + m_LocalPosition: {x: -0.0126, y: 1.0823998, z: 0} + m_LocalScale: {x: 1.275125, y: 0.41488063, z: 1.75} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 9072778288000056937} @@ -236,6 +240,321 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &6221189699254700973 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2943134841320330816} + - component: {fileID: 1157782573338549393} + - component: {fileID: 3037454750331186514} + - component: {fileID: 897249008126550515} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2943134841320330816 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6221189699254700973} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.0126, y: 0.2074, z: 1} + m_LocalScale: {x: 1.275125, y: 1.66485, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9072778288000056937} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1157782573338549393 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6221189699254700973} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3037454750331186514 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6221189699254700973} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &897249008126550515 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6221189699254700973} + 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: 0 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &6827440243987355467 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3822625298225933305} + - component: {fileID: 267582810822197972} + - component: {fileID: 4853005525037899553} + - component: {fileID: 4237135247284648417} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3822625298225933305 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6827440243987355467} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.0126, y: 0.2074, z: -1} + m_LocalScale: {x: 1.275125, y: 1.66485, z: 0.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9072778288000056937} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &267582810822197972 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6827440243987355467} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4853005525037899553 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6827440243987355467} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &4237135247284648417 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6827440243987355467} + 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: 0 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &7186411630894393570 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7621548840300707857} + - component: {fileID: 1869713450444505246} + - component: {fileID: 6770047249548243773} + - component: {fileID: 2369519731081644566} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7621548840300707857 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7186411630894393570} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.7374, y: 0.2074, z: 0} + m_LocalScale: {x: 0.275172, y: 1.66485, z: 2.25} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 9072778288000056937} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1869713450444505246 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7186411630894393570} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6770047249548243773 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7186411630894393570} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!65 &2369519731081644566 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7186411630894393570} + 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: 0 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} --- !u!1001 &7484329249993979532 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index c67c8a0..6ce0adb 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -2439,6 +2439,10 @@ PrefabInstance: propertyPath: m_LocalPosition.y value: -0.62033594 objectReference: {fileID: 0} + - target: {fileID: 6984530638270832661, guid: d594a9afcbadc3646be0b679de9ca105, type: 3} + propertyPath: speed + value: 2 + objectReference: {fileID: 0} - target: {fileID: 7550839803931256216, guid: d594a9afcbadc3646be0b679de9ca105, type: 3} propertyPath: m_LocalPosition.y value: -0.62033594 @@ -3423,7 +3427,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.size - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].Type @@ -3433,13 +3437,21 @@ PrefabInstance: propertyPath: ProductionPhases.Array.data[1].Type value: 1 objectReference: {fileID: 0} + - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} + propertyPath: ProductionPhases.Array.data[2].Type + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].Duration - value: 75 + value: 85 objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[1].Duration - value: 60 + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} + propertyPath: ProductionPhases.Array.data[2].Duration + value: 30 objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].ProductType @@ -3449,13 +3461,21 @@ PrefabInstance: propertyPath: ProductionPhases.Array.data[1].ProductType value: objectReference: {fileID: 11400000, guid: 391357951c671474899a78760489c59f, type: 2} + - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} + propertyPath: ProductionPhases.Array.data[2].ProductType + value: + objectReference: {fileID: 11400000, guid: 42240b227563f074aa0dd8fee3c0cb35, type: 2} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].TotalSpawnCount value: 1 objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[1].TotalSpawnCount - value: 15 + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} + propertyPath: ProductionPhases.Array.data[2].TotalSpawnCount + value: 10 objectReference: {fileID: 0} - target: {fileID: 9072778288000056937, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: m_LocalPosition.x @@ -9066,7 +9086,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].Duration - value: 150 + value: 75 objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].ProductType @@ -13556,7 +13576,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 377939055230277730, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 1371143911924697481, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_Name @@ -13568,7 +13588,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2155638562400233689, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_LocalPosition.x - value: 2.5 + value: 8.25 objectReference: {fileID: 0} - target: {fileID: 2155638562400233689, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_LocalPosition.y @@ -13638,10 +13658,18 @@ PrefabInstance: propertyPath: expectedReagent value: objectReference: {fileID: 11400000, guid: 391357951c671474899a78760489c59f, type: 2} + - target: {fileID: 7838576090119534409, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} + propertyPath: introduceDefect + value: 1 + objectReference: {fileID: 0} - target: {fileID: 7838576090119534409, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: conversionProduct value: objectReference: {fileID: 11400000, guid: 7413928b7579deb4a8e0440376531b10, type: 2} + - target: {fileID: 7838576090119534409, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} + propertyPath: conversionDuration + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 7530552424279411822, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} m_RemovedGameObjects: [] @@ -19517,7 +19545,11 @@ PrefabInstance: m_Modifications: - target: {fileID: 377939055230277730, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1023547921059417941, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} + propertyPath: m_IsActive + value: 0 objectReference: {fileID: 0} - target: {fileID: 1371143911924697481, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_Name @@ -19587,6 +19619,10 @@ PrefabInstance: propertyPath: PossibleOrientations.Array.data[2] value: objectReference: {fileID: 1709831001} + - target: {fileID: 3153645672770501789, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 5260530439957074424, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: m_LocalPosition.x value: 1 @@ -22943,6 +22979,10 @@ PrefabInstance: propertyPath: m_LocalPosition.y value: -0.62033594 objectReference: {fileID: 0} + - target: {fileID: 6984530638270832661, guid: d594a9afcbadc3646be0b679de9ca105, type: 3} + propertyPath: speed + value: 2 + objectReference: {fileID: 0} - target: {fileID: 7550839803931256216, guid: d594a9afcbadc3646be0b679de9ca105, type: 3} propertyPath: m_LocalPosition.y value: -0.62033594 @@ -30411,7 +30451,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7838576090119534409, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: launchPower - value: 10 + value: 7 objectReference: {fileID: 0} - target: {fileID: 7838576090119534409, guid: ae50320a2d4c84c4391086045d06a9c9, type: 3} propertyPath: expectedReagent @@ -30978,7 +31018,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].Duration - value: 150 + value: 75 objectReference: {fileID: 0} - target: {fileID: 6695070873418123376, guid: a3cb7267f99421c4b9912896d1eb7a41, type: 3} propertyPath: ProductionPhases.Array.data[0].ProductType diff --git a/Assets/Scripts/Machines/Converter.cs b/Assets/Scripts/Machines/Converter.cs index 447756c..8197d78 100644 --- a/Assets/Scripts/Machines/Converter.cs +++ b/Assets/Scripts/Machines/Converter.cs @@ -19,8 +19,8 @@ public class Converter: MonoBehaviour, IResetable public float conversionDuration = 5f; private float _conversionTimer; - [FormerlySerializedAs("conversionSound")] public AudioClip conversionClip; - private AudioSource _audioSource; + public AudioClip conversionClip; + public AudioClip launchClip; public Transform refuseLauncher; public float launchPower = 10f; @@ -47,13 +47,6 @@ public class Converter: MonoBehaviour, IResetable CurrentHealth = MaxHealth; inputProducts.Clear(); - - if (_audioSource) - { - _audioSource.Stop(); - Destroy(_audioSource.gameObject); - _audioSource = null; - } } public void Update() @@ -86,12 +79,14 @@ public class Converter: MonoBehaviour, IResetable inputProducts.RemoveAt(0); Destroy(currentProduct); - _audioSource = NAudio.Play(conversionClip, transform.position, 0.75f); + NAudio.Play(conversionClip, transform.position, 0.75f); } else { Expel(inputProducts[0]); inputProducts.RemoveAt(0); + + NAudio.Play(launchClip, transform.position); } _conversionTimer = conversionDuration; diff --git a/Assets/Scripts/Machines/ProductSpawner.cs b/Assets/Scripts/Machines/ProductSpawner.cs index a181369..c32a41f 100644 --- a/Assets/Scripts/Machines/ProductSpawner.cs +++ b/Assets/Scripts/Machines/ProductSpawner.cs @@ -6,6 +6,8 @@ public class ProductSpawner: MonoBehaviour public List PossibleOrientations; public Vector2 yRotation; + public AudioClip spawnClip; + public void SpawnProduct(ProductType type) { var randomIndex = Random.Range(0, PossibleOrientations.Count); @@ -15,6 +17,7 @@ public class ProductSpawner: MonoBehaviour randomOrientation.rotation; ProductType.SpawnProduct(type, transform, randomOrientation.position, rotation); + NAudio.Play(spawnClip, transform.position); } public void SpawnProduct(ProductType type, DefectType defect)