Commit b9510b9b authored by KenzyAshour2's avatar KenzyAshour2

last update for the last scene

parent c2581977
...@@ -23,7 +23,7 @@ MonoBehaviour: ...@@ -23,7 +23,7 @@ MonoBehaviour:
\u0643\u064A\u0641 \u062A\u063A\u064A\u0631 \u0634\u0643\u0644\u064A\u061F \u0644\u0645 \u0643\u064A\u0641 \u062A\u063A\u064A\u0631 \u0634\u0643\u0644\u064A\u061F \u0644\u0645
\u0623\u0639\u062F \u062A\u0644\u0643 \u0627\u0644\u0635\u062E\u0631\u0629 \u0627\u0644\u062E\u0634\u0646\u0629 \u0623\u0639\u062F \u062A\u0644\u0643 \u0627\u0644\u0635\u062E\u0631\u0629 \u0627\u0644\u062E\u0634\u0646\u0629
\u0627\u0644\u062D\u0627\u062F\u0629\u061B \u0644\u0642\u062F \u062C\u0639\u0644\u062A\u0646\u064A \u0627\u0644\u062D\u0627\u062F\u0629\u061B \u0644\u0642\u062F \u062C\u0639\u0644\u062A\u0646\u064A
\u0627\u0644\u0631\u062D\u0644\u0629 \u0646\u0627\u0639\u0645\u0627\u064B \u0648\u0645\u0633\u062A\u062F\u064A\u0631\u0627\u064B.\"\r\n\r\n\"\u0633\u0623\u0646\u0627\u0645 \u0627\u0644\u0631\u062D\u0644\u0629 \u0646\u0627\u0639\u0645\u0627\u064B \u0648\u0645\u0633\u062A\u062F\u064A\u0631\u0627\u064B.\"\r\n\"\u0633\u0623\u0646\u0627\u0645
\u0647\u0646\u0627 \u0645\u0639 \u0623\u0635\u062F\u0642\u0627\u0626\u064A \u0627\u0644\u062D\u0635\u0649 \u0647\u0646\u0627 \u0645\u0639 \u0623\u0635\u062F\u0642\u0627\u0626\u064A \u0627\u0644\u062D\u0635\u0649
\u0644\u0646\u0643\u0648\u0646 \u0637\u0628\u0642\u0629 \u062C\u062F\u064A\u062F\u0629 \u0644\u0646\u0643\u0648\u0646 \u0637\u0628\u0642\u0629 \u062C\u062F\u064A\u062F\u0629
\u0645\u0646 \u0627\u0644\u0623\u0631\u0636. \u0634\u0643\u0631\u0627\u064B \u0644\u0643\u0645 \u0645\u0646 \u0627\u0644\u0623\u0631\u0636. \u0634\u0643\u0631\u0627\u064B \u0644\u0643\u0645
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5402467791447101225
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4896380137390114607}
- component: {fileID: 8632553811396521187}
- component: {fileID: 1183979416848431580}
- component: {fileID: -8138534969968993599}
- component: {fileID: 68494390454496024}
m_Layer: 0
m_Name: Floating 2
m_TagString: Rock
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4896380137390114607
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5402467791447101225}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3.1160543, y: -5.081241, z: 0}
m_LocalScale: {x: 0.10360218, y: 0.10360218, z: 0.10360218}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8632553811396521187
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5402467791447101225}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, 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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_Sprite: {fileID: -225277643, guid: 80c15077b5846b040b22ce10411e9d9a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!58 &1183979416848431580
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5402467791447101225}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.22, y: 0.01}
serializedVersion: 2
m_Radius: 1.89
--- !u!50 &-8138534969968993599
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5402467791447101225}
m_BodyType: 1
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &68494390454496024
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5402467791447101225}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6b40841678170634eaef06a08bc443a1, type: 3}
m_Name:
m_EditorClassIdentifier:
floatSpeed: 1
touchEffectPrefab: {fileID: 0}
fileFormatVersion: 2
guid: 385871b7bb29c4046ad8d9dea66d0371
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -12,6 +12,7 @@ GameObject: ...@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 8551629717659174405} - component: {fileID: 8551629717659174405}
- component: {fileID: 3187258019987708695} - component: {fileID: 3187258019987708695}
- component: {fileID: 3816263568041903583} - component: {fileID: 3816263568041903583}
- component: {fileID: -2207923481999681790}
m_Layer: 0 m_Layer: 0
m_Name: floating m_Name: floating
m_TagString: Rock m_TagString: Rock
...@@ -74,7 +75,7 @@ SpriteRenderer: ...@@ -74,7 +75,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 1 m_SortingOrder: 2
m_Sprite: {fileID: -636720999, guid: 80c15077b5846b040b22ce10411e9d9a, type: 3} m_Sprite: {fileID: -636720999, guid: 80c15077b5846b040b22ce10411e9d9a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0 m_FlipX: 0
...@@ -134,4 +135,30 @@ MonoBehaviour: ...@@ -134,4 +135,30 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
floatSpeed: 1 floatSpeed: 1
floatRange: 0.5 --- !u!50 &-2207923481999681790
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051837905417}
m_BodyType: 1
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
...@@ -838,51 +838,38 @@ MonoBehaviour: ...@@ -838,51 +838,38 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
levelName: "\u0631\u062D\u0644\u0629 \u0627\u0644\u0635\u062E\u0631\u0629" levelName: "\u0631\u062D\u0644\u0629 \u0627\u0644\u0635\u062E\u0631\u0629"
description: "\u062A\u0628\u062F\u0623 \u0631\u062D\u0644\u0629 \u0645\u062D\u0627\u0643\u0627\u0629 description: "\u062A\u0623\u062E\u0630 \u0647\u0630\u0647 \u0627\u0644\u0644\u0639\u0628\u0629
\u062F\u0648\u0631\u0629 \u0627\u0644\u0635\u062E\u0648\u0631 \u0628\u0645\u0634\u0647\u062F \u0627\u0644\u0644\u0627\u0639\u0628 \u0641\u064A \u0631\u062D\u0644\u0629 \u062A\u0641\u0627\u0639\u0644\u064A\u0629
\u062F\u0631\u0627\u0645\u064A \u0641\u064A \u0628\u064A\u0626\u0629 \u0628\u0631\u0643\u0627\u0646\u064A\u0629 \u0628\u0623\u0633\u0644\u0648\u0628 \u0642\u0635\u0635\u064A \u0634\u064A\u0642
\u0646\u0634\u0637\u0629\u060C \u062D\u064A\u062B \u062A\u062E\u0631\u062C \u0627\u0644\u0635\u062E\u0631\u0629 \u0644\u0627\u0633\u062A\u0643\u0634\u0627\u0641 \u062F\u0648\u0631\u0629 \u0627\u0644\u0635\u062E\u0648\u0631
\u0645\u0646 \u0628\u0627\u0637\u0646 \u0627\u0644\u0623\u0631\u0636 \u0643\u062D\u0645\u0645 \u0641\u064A \u0627\u0644\u0637\u0628\u064A\u0639\u0629\u060C \u0628\u0639\u064A\u062F\u0627\u064B
\u0645\u0646\u0635\u0647\u0631\u0629 (\u0645\u0627\u063A\u0645\u0627) \u0648\u062A\u062A\u0635\u0644\u0628 \u0639\u0646 \u0623\u0633\u0627\u0644\u064A\u0628 \u0627\u0644\u062A\u0644\u0642\u064A\u0646
\u0641\u0648\u0631 \u0645\u0644\u0627\u0645\u0633\u062A\u0647\u0627 \u0644\u0644\u0647\u0648\u0627\u0621 \u0627\u0644\u062A\u0642\u0644\u064A\u062F\u064A\u0629. \u062A\u0628\u062F\u0623
\u0627\u0644\u0628\u0627\u0631\u062F \u0644\u062A\u062A\u062D\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0645\u063A\u0627\u0645\u0631\u0629 \u0645\u0646 \u0628\u0627\u0637\u0646
\u0635\u062E\u0631\u0629 \u0646\u0627\u0631\u064A\u0629 \u062E\u0634\u0646\u0629 \u0627\u0644\u0623\u0631\u0636 \u0645\u0639 \u062E\u0631\u0648\u062C \u0627\u0644\u0635\u0647\u0627\u0631\u0629
\u0648\u062F\u0627\u0643\u0646\u0629\u060C \u062B\u0645 \u062A\u0646\u062A\u0642\u0644 \u0648\u0627\u0644\u0646\u0634\u0627\u0637 \u0627\u0644\u0628\u0631\u0643\u0627\u0646\u064A\u060C
\u0627\u0644\u0623\u062D\u062F\u0627\u062B \u0625\u0644\u0649 \u0642\u0645\u0629 \u062B\u0645 \u064A\u0646\u062A\u0642\u0644 \u0627\u0644\u0644\u0627\u0639\u0628
\u062C\u0628\u0644 \u0634\u0627\u0647\u0642 \u062D\u064A\u062B \u062A\u062A\u0639\u0631\u0636 \u0625\u0644\u0649 \u0642\u0645\u0645 \u0627\u0644\u062C\u0628\u0627\u0644 \u0644\u064A\u0631\u0649
\u0627\u0644\u0635\u062E\u0631\u0629 \u0644\u0639\u0648\u0627\u0645\u0644 \u0627\u0644\u062A\u062C\u0648\u064A\u0629 \u0623\u062B\u0631 \u0627\u0644\u0639\u0648\u0627\u0645\u0644 \u0627\u0644\u062C\u0648\u064A\u0629\u060C
\u0627\u0644\u0645\u064A\u0643\u0627\u0646\u064A\u0643\u064A\u0629\u060C \u0625\u0630 \u062D\u064A\u062B \u064A\u062A\u0641\u0627\u0639\u0644 \u0628\u0627\u0644\u0644\u0645\u0633
\u062A\u062A\u0633\u0644\u0644 \u0645\u064A\u0627\u0647 \u0627\u0644\u0623\u0645\u0637\u0627\u0631 \u0644\u062A\u0641\u062A\u064A\u062A \u0627\u0644\u0635\u062E\u0648\u0631 \u0648\u0645\u062D\u0627\u0643\u0627\u0629
\u062F\u0627\u062E\u0644 \u0634\u0642\u0648\u0642\u0647\u0627 \u0648\u062A\u062A\u062C\u0645\u062F \u0639\u0645\u0644\u064A\u0629 \u0627\u0644\u062A\u062C\u0648\u064A\u0629 \u0627\u0644\u0645\u064A\u0643\u0627\u0646\u064A\u0643\u064A\u0629.
\u0644\u064A\u0644\u0627\u064B\u060C \u0645\u0645\u0627 \u064A\u0648\u0644\u062F \u062A\u0633\u062A\u0645\u0631 \u0627\u0644\u0631\u062D\u0644\u0629 \u0645\u0639
\u0636\u063A\u0637\u0627\u064B \u062F\u0627\u062E\u0644\u064A\u0627\u064B \u0647\u0627\u0626\u0644\u0627\u064B \u0627\u0646\u062A\u0642\u0627\u0644 \u0627\u0644\u0641\u062A\u0627\u062A \u0627\u0644\u0635\u062E\u0631\u064A
(\u0648\u062A\u062F \u0627\u0644\u0635\u0642\u064A\u0639) \u064A\u0624\u062F\u064A \u0639\u0628\u0631 \u0639\u0645\u0644\u064A\u0629 \u0627\u0644\u062A\u0639\u0631\u064A\u0629\u060C
\u0625\u0644\u0649 \u062A\u0643\u0633\u0631\u0647\u0627 \u0648\u062A\u0641\u062A\u062A\u0647\u0627 \u0648\u0635\u0648\u0644\u0627\u064B \u0625\u0644\u0649 \u0645\u0634\u0647\u062F
\u0625\u0644\u0649 \u0623\u062C\u0632\u0627\u0621 \u0635\u063A\u064A\u0631\u0629. \u0623\u0639\u0645\u0627\u0642 \u0627\u0644\u0628\u062D\u0627\u0631 \u0627\u0644\u0633\u0627\u062D\u0631
\u0628\u0641\u0639\u0644 \u0627\u0644\u062C\u0627\u0630\u0628\u064A\u0629\u060C \u0627\u0644\u0645\u0644\u064A\u0621 \u0628\u0627\u0644\u0641\u0642\u0627\u0639\u0627\u062A
\u062A\u0633\u0642\u0637 \u0647\u0630\u0647 \u0627\u0644\u0634\u0638\u0627\u064A\u0627 \u0648\u0627\u0644\u0635\u062E\u0648\u0631 \u0627\u0644\u0639\u0627\u0626\u0645\u0629.
\u0641\u064A \u0645\u062C\u0631\u0649 \u0646\u0647\u0631 \u062C\u0627\u0631\u0641 \u0648\u0647\u0646\u0627 \u064A\u0642\u0648\u0645 \u0627\u0644\u0644\u0627\u0639\u0628
\u0644\u062A\u0628\u062F\u0623 \u0645\u0631\u062D\u0644\u0629 \u0627\u0644\u062A\u0639\u0631\u064A\u0629 \u0628\u0646\u0641\u0633\u0647 \u0628\u0633\u062D\u0628 \u0647\u0630\u0647 \u0627\u0644\u0635\u062E\u0648\u0631
\u0648\u0627\u0644\u0646\u0642\u0644\u060C \u0648\u062E\u0644\u0627\u0644 \u0647\u0630\u0647 \u0648\u062A\u062B\u0628\u064A\u062A\u0647\u0627 \u0641\u064A \u0627\u0644\u0642\u0627\u0639
\u0627\u0644\u0631\u062D\u0644\u0629 \u0627\u0644\u0637\u0648\u064A\u0644\u0629 \u0644\u0645\u062D\u0627\u0643\u0627\u0629 \u0639\u0645\u0644\u064A\u0629 \u0627\u0644\u062A\u0631\u0633\u064A\u0628
\u062A\u062A\u062F\u062D\u0631\u062C \u0627\u0644\u0635\u062E\u0631\u0629 \u0648\u062A\u0635\u0637\u062F\u0645 \u0648\u062A\u0643\u0648\u064A\u0646 \u0627\u0644\u0637\u0628\u0642\u0627\u062A
\u0628\u0627\u0644\u0642\u0627\u0639 \u0648\u0628\u0635\u062E\u0648\u0631 \u0623\u062E\u0631\u0649\u060C \u0627\u0644\u0635\u062E\u0631\u064A\u0629 \u0627\u0644\u062C\u062F\u064A\u062F\u0629\u060C
\u0645\u0645\u0627 \u064A\u0624\u062F\u064A \u0625\u0644\u0649 \u062D\u062A \u062D\u0648\u0627\u0641\u0647\u0627 \u0645\u0645\u0627 \u064A\u062F\u0645\u062C \u0628\u064A\u0646 \u0627\u0644\u0644\u0639\u0628
\u0627\u0644\u062D\u0627\u062F\u0629 \u0648\u062A\u062D\u0648\u0644\u0647\u0627 \u0627\u0644\u0645\u0645\u062A\u0639 \u0648\u0627\u0644\u0641\u0647\u0645 \u0627\u0644\u0639\u0645\u064A\u0642
\u062A\u062F\u0631\u064A\u062C\u064A\u0627\u064B \u0625\u0644\u0649 \u062D\u0635\u0627\u0629 \u0644\u0644\u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u062C\u064A\u0648\u0644\u0648\u062C\u064A\u0629."
\u0645\u0644\u0633\u0627\u0621 \u0648\u0645\u0633\u062A\u062F\u064A\u0631\u0629\u060C
\u0648\u0635\u0648\u0644\u0627\u064B \u0625\u0644\u0649 \u0633\u0642\u0648\u0637\u0647\u0627
\u0639\u0628\u0631 \u0634\u0644\u0627\u0644 \u0645\u0631\u062A\u0641\u0639\u060C
\u0644\u062A\u0646\u062A\u0647\u064A \u0627\u0644\u0645\u062D\u0627\u0643\u0627\u0629
\u0623\u062E\u064A\u0631\u0627\u064B \u0641\u064A \u0645\u0631\u062D\u0644\u0629
\u0627\u0644\u062A\u0631\u0633\u064A\u0628 \u0639\u0646\u062F \u0645\u0635\u0628
\u0627\u0644\u0646\u0647\u0631 \u0641\u064A \u0627\u0644\u0628\u062D\u0631\u060C
\u062D\u064A\u062B \u062A\u062A\u0628\u0627\u0637\u0623 \u0633\u0631\u0639\u0629
\u0627\u0644\u062A\u064A\u0627\u0631 \u0648\u062A\u063A\u0648\u0635 \u0627\u0644\u0635\u062E\u0631\u0629
\u0628\u0628\u0637\u0621 \u0644\u062A\u0633\u062A\u0642\u0631 \u0628\u0633\u0644\u0627\u0645
\u0641\u064A \u0627\u0644\u0642\u0627\u0639 \u0627\u0644\u0631\u0645\u0644\u064A
\u0648\u062A\u0635\u0628\u062D \u062C\u0632\u0621\u0627\u064B \u0645\u0646 \u0627\u0644\u0637\u0628\u0642\u0627\u062A
\u0627\u0644\u0631\u0633\u0648\u0628\u064A\u0629 \u0627\u0644\u062C\u062F\u064A\u062F\u0629."
mechanics: "\u0622\u0644\u064A\u0627\u062A \u0627\u0644\u0644\u0639\u0628 (\u0637\u0631\u064A\u0642\u0629 mechanics: "\u0622\u0644\u064A\u0627\u062A \u0627\u0644\u0644\u0639\u0628 (\u0637\u0631\u064A\u0642\u0629
\u0627\u0644\u062A\u062D\u0643\u0645): \u062A\u0639\u062A\u0645\u062F \u0627\u0644\u0644\u0639\u0628\u0629 \u0627\u0644\u062A\u062D\u0643\u0645): \u062A\u0639\u062A\u0645\u062F \u0627\u0644\u0644\u0639\u0628\u0629
\u0639\u0644\u0649 \u0627\u0644\u062A\u0641\u0627\u0639\u0644 \u0627\u0644\u0645\u0628\u0627\u0634\u0631 \u0639\u0644\u0649 \u0627\u0644\u062A\u0641\u0627\u0639\u0644 \u0627\u0644\u0645\u0628\u0627\u0634\u0631
...@@ -1026,6 +1013,83 @@ SpriteRenderer: ...@@ -1026,6 +1013,83 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!1 &495577465
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 495577466}
- component: {fileID: 495577467}
m_Layer: 0
m_Name: ground Zonn
m_TagString: Ground
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &495577466
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 495577465}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -4.66, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1020260190}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &495577467
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 495577465}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.06658363, y: -1.0120871}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 9.8690815, y: 3.2372465}
m_EdgeRadius: 0
--- !u!1 &515365337 --- !u!1 &515365337
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2055,6 +2119,7 @@ Transform: ...@@ -2055,6 +2119,7 @@ Transform:
- {fileID: 1802961620} - {fileID: 1802961620}
- {fileID: 1339775669} - {fileID: 1339775669}
- {fileID: 1641698562} - {fileID: 1641698562}
- {fileID: 495577466}
m_Father: {fileID: 1394706199} m_Father: {fileID: 1394706199}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1089729862 --- !u!1 &1089729862
...@@ -3684,7 +3749,7 @@ Transform: ...@@ -3684,7 +3749,7 @@ Transform:
- {fileID: 6487795820311449261} - {fileID: 6487795820311449261}
- {fileID: 6487795820375087467} - {fileID: 6487795820375087467}
- {fileID: 6487795819825015281} - {fileID: 6487795819825015281}
- {fileID: 6487795820076689221} - {fileID: 1272041544523768808}
- {fileID: 6487795819872092342} - {fileID: 6487795819872092342}
- {fileID: 6487795820416849293} - {fileID: 6487795820416849293}
- {fileID: 6487795819570424898} - {fileID: 6487795819570424898}
...@@ -4381,6 +4446,8 @@ MonoBehaviour: ...@@ -4381,6 +4446,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e82297402d0684642aca8d0e81e83595, type: 3} m_Script: {fileID: 11500000, guid: e82297402d0684642aca8d0e81e83595, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
nextButton: {fileID: 1202860662}
rocksNeededToWin: 4
bubblePrefab: {fileID: 5792948449186520717, guid: e831e128fab464e4cad385078b2b7781, type: 3} bubblePrefab: {fileID: 5792948449186520717, guid: e831e128fab464e4cad385078b2b7781, type: 3}
bubbleSpawnPoints: bubbleSpawnPoints:
- {fileID: 873217661} - {fileID: 873217661}
...@@ -4388,7 +4455,9 @@ MonoBehaviour: ...@@ -4388,7 +4455,9 @@ MonoBehaviour:
- {fileID: 1124648097} - {fileID: 1124648097}
- {fileID: 694476250} - {fileID: 694476250}
bubbleInterval: 1.5 bubbleInterval: 1.5
rockPrefab: {fileID: 8621037051837905417, guid: 386b2a2977a0a3349b016d11310d02f1, type: 3} rockPrefabs:
- {fileID: 8621037051837905417, guid: 386b2a2977a0a3349b016d11310d02f1, type: 3}
- {fileID: 5402467791447101225, guid: 385871b7bb29c4046ad8d9dea66d0371, type: 3}
initialRockCount: 9 initialRockCount: 9
spawnPadding: 0.5 spawnPadding: 0.5
--- !u!1 &1821597984 --- !u!1 &1821597984
...@@ -5433,6 +5502,21 @@ BoxCollider: ...@@ -5433,6 +5502,21 @@ BoxCollider:
serializedVersion: 3 serializedVersion: 3
m_Size: {x: 1.7350216, y: 0.28497183, z: 1} m_Size: {x: 1.7350216, y: 0.28497183, z: 1}
m_Center: {x: 0.3675108, y: -0.35751408, z: 0} m_Center: {x: 0.3675108, y: -0.35751408, z: 0}
--- !u!4 &1272041544523768808
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1778137988350077934}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3.1160543, y: -5.081241, z: 0}
m_LocalScale: {x: 0.10360218, y: 0.10360218, z: 0.10360218}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1641698562}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1285421633259005250 --- !u!1001 &1285421633259005250
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5490,6 +5574,77 @@ PrefabInstance: ...@@ -5490,6 +5574,77 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 543871ca6c7e44a4392c5b1cf82a39db, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 543871ca6c7e44a4392c5b1cf82a39db, type: 3}
--- !u!1 &1778137988350077934
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1272041544523768808}
- component: {fileID: 2709092425643690020}
- component: {fileID: 4772139677972274459}
- component: {fileID: 6726760813545995782}
m_Layer: 0
m_Name: Rock 8 (6)
m_TagString: Rock
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &2709092425643690020
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1778137988350077934}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, 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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_Sprite: {fileID: -225277643, guid: 80c15077b5846b040b22ce10411e9d9a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1001 &3297189355583199387 --- !u!1001 &3297189355583199387
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5559,6 +5714,41 @@ PrefabInstance: ...@@ -5559,6 +5714,41 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 51d78aefd5de06d4ca8281fb359b8068, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 51d78aefd5de06d4ca8281fb359b8068, type: 3}
--- !u!58 &4772139677972274459
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1778137988350077934}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.22, y: 0.01}
serializedVersion: 2
m_Radius: 1.89
--- !u!1001 &5525809312677681640 --- !u!1001 &5525809312677681640
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5757,21 +5947,6 @@ Transform: ...@@ -5757,21 +5947,6 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 1641698562} m_Father: {fileID: 1641698562}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &6487795820076689221
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051622094625}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3.1160543, y: -5.081241, z: 0}
m_LocalScale: {x: 0.10360218, y: 0.10360218, z: 0.10360218}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1641698562}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &6487795820112505816 --- !u!4 &6487795820112505816
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5877,15 +6052,22 @@ Transform: ...@@ -5877,15 +6052,22 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 1641698562} m_Father: {fileID: 1641698562}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!58 &7581605641843168290 --- !u!50 &6726760813545995782
CircleCollider2D: Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051574549436} m_GameObject: {fileID: 1778137988350077934}
m_Enabled: 1 m_BodyType: 1
m_Density: 1 m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_IncludeLayers: m_IncludeLayers:
serializedVersion: 2 serializedVersion: 2
...@@ -5893,32 +6075,17 @@ CircleCollider2D: ...@@ -5893,32 +6075,17 @@ CircleCollider2D:
m_ExcludeLayers: m_ExcludeLayers:
serializedVersion: 2 serializedVersion: 2
m_Bits: 0 m_Bits: 0
m_LayerOverridePriority: 0 m_Interpolate: 0
m_ForceSendLayers: m_SleepingMode: 1
serializedVersion: 2 m_CollisionDetection: 0
m_Bits: 4294967295 m_Constraints: 0
m_ForceReceiveLayers: --- !u!58 &7581605641843168290
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -0.22, y: 0.01}
serializedVersion: 2
m_Radius: 1.89
--- !u!58 &7581605641904763223
CircleCollider2D: CircleCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051387092681} m_GameObject: {fileID: 8621037051574549436}
m_Enabled: 1 m_Enabled: 1
m_Density: 1 m_Density: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
...@@ -5947,13 +6114,13 @@ CircleCollider2D: ...@@ -5947,13 +6114,13 @@ CircleCollider2D:
m_Offset: {x: -0.22, y: 0.01} m_Offset: {x: -0.22, y: 0.01}
serializedVersion: 2 serializedVersion: 2
m_Radius: 1.89 m_Radius: 1.89
--- !u!58 &7581605641987687137 --- !u!58 &7581605641904763223
CircleCollider2D: CircleCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051438574975} m_GameObject: {fileID: 8621037051387092681}
m_Enabled: 1 m_Enabled: 1
m_Density: 1 m_Density: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
...@@ -5982,13 +6149,13 @@ CircleCollider2D: ...@@ -5982,13 +6149,13 @@ CircleCollider2D:
m_Offset: {x: -0.22, y: 0.01} m_Offset: {x: -0.22, y: 0.01}
serializedVersion: 2 serializedVersion: 2
m_Radius: 1.89 m_Radius: 1.89
--- !u!58 &7581605642134404940 --- !u!58 &7581605641987687137
CircleCollider2D: CircleCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051820150994} m_GameObject: {fileID: 8621037051438574975}
m_Enabled: 1 m_Enabled: 1
m_Density: 1 m_Density: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
...@@ -6017,13 +6184,13 @@ CircleCollider2D: ...@@ -6017,13 +6184,13 @@ CircleCollider2D:
m_Offset: {x: -0.22, y: 0.01} m_Offset: {x: -0.22, y: 0.01}
serializedVersion: 2 serializedVersion: 2
m_Radius: 1.89 m_Radius: 1.89
--- !u!58 &7581605642206861503 --- !u!58 &7581605642134404940
CircleCollider2D: CircleCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051622094625} m_GameObject: {fileID: 8621037051820150994}
m_Enabled: 1 m_Enabled: 1
m_Density: 1 m_Density: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
...@@ -6869,58 +7036,6 @@ SpriteRenderer: ...@@ -6869,58 +7036,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!212 &8551629717807221549
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8621037051622094625}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, 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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_Sprite: {fileID: -225277643, guid: 80c15077b5846b040b22ce10411e9d9a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &8621037050799995285 --- !u!1 &8621037050799995285
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -7029,24 +7144,6 @@ GameObject: ...@@ -7029,24 +7144,6 @@ GameObject:
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!1 &8621037051622094625
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6487795820076689221}
- component: {fileID: 8551629717807221549}
- component: {fileID: 7581605642206861503}
m_Layer: 0
m_Name: Rock 8 (6)
m_TagString: Rock
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &8621037051820150994 --- !u!1 &8621037051820150994
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic; using System.Collections.Generic;
public class DeepSeaSpawner : MonoBehaviour public class DeepSeaSpawner : MonoBehaviour
{ {
[Header("Game Logic")]
public Button nextButton;
public int rocksNeededToWin = 3;
[SerializeField] GameObject bubblePrefab; private int currentPlacedRocks = 0;
[SerializeField] Transform[] bubbleSpawnPoints;
[SerializeField] float bubbleInterval = 1.5f;
[SerializeField] GameObject rockPrefab; [Header("Bubble Settings")]
[SerializeField] int initialRockCount = 10; public GameObject bubblePrefab;
[SerializeField] float spawnPadding = 0.5f; public Transform[] bubbleSpawnPoints;
public float bubbleInterval = 1.5f;
[Header("Floating Rock Settings")]
public GameObject[] rockPrefabs;
public int initialRockCount = 12;
public float spawnPadding = 0.5f;
private List<GameObject> spawnedObjects = new List<GameObject>(); private List<GameObject> spawnedObjects = new List<GameObject>();
private Camera cam; private Camera cam;
void Start() void Start()
{ {
cam = Camera.main; cam = Camera.main;
} }
void OnEnable() void OnEnable()
{ {
if (cam == null) cam = Camera.main; if (cam == null) cam = Camera.main;
// Reset the game logic
currentPlacedRocks = 0;
// --- THE FIX ---
// We wait 0.1 seconds to make sure we override the ImageSwitcher
Invoke(nameof(LockButton), 0.1f);
// ----------------
SpawnInitialRocks(); SpawnInitialRocks();
InvokeRepeating(nameof(SpawnBubble), 0f, bubbleInterval); InvokeRepeating(nameof(SpawnBubble), 0f, bubbleInterval);
} }
void LockButton()
{
if (nextButton != null)
{
nextButton.interactable = false;
}
}
void OnDisable() void OnDisable()
{ {
CancelInvoke(); CancelInvoke();
CleanupObjects(); CleanupObjects();
} }
public void RockPlaced()
{
currentPlacedRocks++;
if (currentPlacedRocks >= rocksNeededToWin)
{
if (nextButton != null) nextButton.interactable = true;
Debug.Log("Deposition Complete! Next button unlocked.");
}
}
void SpawnInitialRocks() void SpawnInitialRocks()
{ {
Vector2 minScreen = cam.ViewportToWorldPoint(new Vector3(0, 0, 0)); Vector2 minScreen = cam.ViewportToWorldPoint(new Vector3(0, 0, 0));
Vector2 maxScreen = cam.ViewportToWorldPoint(new Vector3(1, 1, 0)); Vector2 maxScreen = cam.ViewportToWorldPoint(new Vector3(1, 1, 0));
float bottomLimit = minScreen.y + 2.0f;
for (int i = 0; i < initialRockCount; i++) for (int i = 0; i < initialRockCount; i++)
{ {
if (rockPrefabs.Length == 0) return;
GameObject randomPrefab = rockPrefabs[Random.Range(0, rockPrefabs.Length)];
float randomX = Random.Range(minScreen.x + spawnPadding, maxScreen.x - spawnPadding); float randomX = Random.Range(minScreen.x + spawnPadding, maxScreen.x - spawnPadding);
float randomY = Random.Range(minScreen.y + spawnPadding, maxScreen.y - spawnPadding); float randomY = Random.Range(bottomLimit, maxScreen.y - spawnPadding);
Vector3 spawnPos = new Vector3(randomX, randomY, 0); Vector3 spawnPos = new Vector3(randomX, randomY, 0);
GameObject rock = Instantiate(rockPrefab, spawnPos, Quaternion.identity);
GameObject rock = Instantiate(randomPrefab, spawnPos, Quaternion.identity);
rock.transform.SetParent(this.transform); rock.transform.SetParent(this.transform);
spawnedObjects.Add(rock); spawnedObjects.Add(rock);
......
...@@ -3,26 +3,36 @@ using UnityEngine; ...@@ -3,26 +3,36 @@ using UnityEngine;
public class FloatingDraggableRock : MonoBehaviour public class FloatingDraggableRock : MonoBehaviour
{ {
[Header("Floating Settings")] [Header("Floating Settings")]
[SerializeField] float floatSpeed = 0.5f; public float floatSpeed = 0.5f;
private Vector3 targetPos; private Vector3 targetPos;
private bool isDragging = false; private bool isDragging = false;
private bool isPlaced = false; // Is it stuck to the ground?
private bool isHoveringGround = false; // Are we currently over the zone?
private Vector3 dragOffset; private Vector3 dragOffset;
private float zCoord; private float zCoord;
private Camera cam; private Camera cam;
private DeepSeaSpawner mySpawner;
void Start() void Start()
{ {
cam = Camera.main; cam = Camera.main;
// Find the spawner so we can tell it when we are placed
mySpawner = GetComponentInParent<DeepSeaSpawner>();
PickNewScreenTarget(); PickNewScreenTarget();
} }
void Update() void Update()
{ {
// If placed, do nothing (stay stuck)
if (isPlaced) return;
if (!isDragging) if (!isDragging)
{ {
// Move slowly towards the target
transform.position = Vector3.MoveTowards(transform.position, targetPos, floatSpeed * Time.deltaTime); transform.position = Vector3.MoveTowards(transform.position, targetPos, floatSpeed * Time.deltaTime);
if (Vector3.Distance(transform.position, targetPos) < 0.1f) if (Vector3.Distance(transform.position, targetPos) < 0.1f)
{ {
PickNewScreenTarget(); PickNewScreenTarget();
...@@ -32,8 +42,8 @@ public class FloatingDraggableRock : MonoBehaviour ...@@ -32,8 +42,8 @@ public class FloatingDraggableRock : MonoBehaviour
void PickNewScreenTarget() void PickNewScreenTarget()
{ {
// Keep floating targets high up so they don't accidentally float into the ground zone
Vector2 minScreen = cam.ViewportToWorldPoint(new Vector3(0.1f, 0.1f, 0)); Vector2 minScreen = cam.ViewportToWorldPoint(new Vector3(0.1f, 0.3f, 0)); // Start 30% up the screen
Vector2 maxScreen = cam.ViewportToWorldPoint(new Vector3(0.9f, 0.9f, 0)); Vector2 maxScreen = cam.ViewportToWorldPoint(new Vector3(0.9f, 0.9f, 0));
float x = Random.Range(minScreen.x, maxScreen.x); float x = Random.Range(minScreen.x, maxScreen.x);
...@@ -44,6 +54,9 @@ public class FloatingDraggableRock : MonoBehaviour ...@@ -44,6 +54,9 @@ public class FloatingDraggableRock : MonoBehaviour
void OnMouseDown() void OnMouseDown()
{ {
// You cannot drag it anymore if it is already placed!
if (isPlaced) return;
isDragging = true; isDragging = true;
zCoord = cam.WorldToScreenPoint(gameObject.transform.position).z; zCoord = cam.WorldToScreenPoint(gameObject.transform.position).z;
dragOffset = gameObject.transform.position - GetMouseAsWorldPoint(); dragOffset = gameObject.transform.position - GetMouseAsWorldPoint();
...@@ -51,13 +64,34 @@ public class FloatingDraggableRock : MonoBehaviour ...@@ -51,13 +64,34 @@ public class FloatingDraggableRock : MonoBehaviour
void OnMouseDrag() void OnMouseDrag()
{ {
if (isPlaced) return;
transform.position = GetMouseAsWorldPoint() + dragOffset; transform.position = GetMouseAsWorldPoint() + dragOffset;
} }
void OnMouseUp() void OnMouseUp()
{ {
isDragging = false; isDragging = false;
PickNewScreenTarget();
// CHECK: Did we drop it on the ground?
if (isHoveringGround)
{
StickToGround();
}
else
{
PickNewScreenTarget();
}
}
void StickToGround()
{
isPlaced = true;
// Tell the Spawner we did it
if (mySpawner != null)
{
mySpawner.RockPlaced();
}
} }
private Vector3 GetMouseAsWorldPoint() private Vector3 GetMouseAsWorldPoint()
...@@ -66,4 +100,22 @@ public class FloatingDraggableRock : MonoBehaviour ...@@ -66,4 +100,22 @@ public class FloatingDraggableRock : MonoBehaviour
mousePoint.z = zCoord; mousePoint.z = zCoord;
return cam.ScreenToWorldPoint(mousePoint); return cam.ScreenToWorldPoint(mousePoint);
} }
// --- COLLISION DETECTION ---
void OnTriggerEnter2D(Collider2D other)
{
// Make sure your Ground object has the Tag "Ground"
if (other.CompareTag("Ground"))
{
isHoveringGround = true;
}
}
void OnTriggerExit2D(Collider2D other)
{
if (other.CompareTag("Ground"))
{
isHoveringGround = false;
}
}
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ TagManager: ...@@ -6,6 +6,7 @@ TagManager:
tags: tags:
- Rock - Rock
- Basket - Basket
- Ground
layers: layers:
- Default - Default
- TransparentFX - TransparentFX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment