diff --git a/Assets/Editor/PuzzleChainEditorWindow.cs b/Assets/Editor/PuzzleChainEditorWindow.cs index cfbe5467..708dc14b 100644 --- a/Assets/Editor/PuzzleChainEditorWindow.cs +++ b/Assets/Editor/PuzzleChainEditorWindow.cs @@ -27,18 +27,38 @@ public class PuzzleChainEditorWindow : EditorWindow private void LoadPuzzleSteps() { puzzleSteps.Clear(); - string[] guids = AssetDatabase.FindAssets("t:PuzzleStepSO", new[] { "Assets/Data/Puzzles" }); + // Find all PuzzleStepSO assets in the project + string[] guids = AssetDatabase.FindAssets("t:PuzzleStepSO"); foreach (var guid in guids) { var path = AssetDatabase.GUIDToAssetPath(guid); - var step = AssetDatabase.LoadAssetAtPath(path); - if (step != null) - puzzleSteps.Add(step); + // Only include those under Assets/Data/Puzzles (case-insensitive) + if (path.Replace('\\', '/').StartsWith("Assets/Data/Puzzles", System.StringComparison.OrdinalIgnoreCase)) + { + var step = AssetDatabase.LoadAssetAtPath(path); + if (step != null) + puzzleSteps.Add(step); + } + } + // Remove any nulls just in case + puzzleSteps.RemoveAll(s => s == null); + // Remove nulls from unlocks lists + foreach (var step in puzzleSteps) + { + if (step.unlocks != null) + step.unlocks.RemoveAll(u => u == null); } } private void ProcessPuzzleChains() { + // Defensive: ensure no nulls in puzzleSteps or unlocks + puzzleSteps.RemoveAll(s => s == null); + foreach (var step in puzzleSteps) + { + if (step.unlocks != null) + step.unlocks.RemoveAll(u => u == null); + } dependencyGraph = PuzzleGraphUtility.BuildDependencyGraph(puzzleSteps); } @@ -51,9 +71,10 @@ public class PuzzleChainEditorWindow : EditorWindow return; } scrollPos = EditorGUILayout.BeginScrollView(scrollPos); - var initialSteps = PuzzleGraphUtility.FindInitialSteps(dependencyGraph); + var initialSteps = dependencyGraph != null ? PuzzleGraphUtility.FindInitialSteps(dependencyGraph) : new List(); foreach (var step in initialSteps) { + if (step == null) continue; // Defensive EditorGUILayout.BeginVertical("box"); EditorGUILayout.LabelField($"Step Path: {step.displayName} ({step.stepId})", EditorStyles.largeLabel); GUILayout.Space(6); @@ -66,6 +87,10 @@ public class PuzzleChainEditorWindow : EditorWindow private void DrawStepTree(PuzzleStepSO step, int indent) { + if (step == null) { + EditorGUILayout.LabelField("[Missing Step]", EditorStyles.boldLabel); + return; + } EditorGUILayout.BeginHorizontal(); GUILayout.Space(indent * INDENT_SIZE); EditorGUILayout.BeginVertical("box"); @@ -74,15 +99,18 @@ public class PuzzleChainEditorWindow : EditorWindow GUILayout.Space(4); if (GUILayout.Button("Open in Inspector", GUILayout.Width(150))) { - Selection.activeObject = step; // Opens in Inspector - EditorGUIUtility.PingObject(step); // Highlights in Project + Selection.activeObject = step; + EditorGUIUtility.PingObject(step); } EditorGUILayout.EndVertical(); EditorGUILayout.EndHorizontal(); - GUILayout.Space(6); // Spacer between steps - foreach (var unlock in step.unlocks) + GUILayout.Space(6); + if (step.unlocks != null) { - DrawStepTree(unlock, indent + 1); + foreach (var unlock in step.unlocks) + { + DrawStepTree(unlock, indent + 1); + } } } } diff --git a/Assets/Editor/SceneObjectLocatorWindow.cs b/Assets/Editor/SceneObjectLocatorWindow.cs new file mode 100644 index 00000000..29b73450 --- /dev/null +++ b/Assets/Editor/SceneObjectLocatorWindow.cs @@ -0,0 +1,176 @@ +using UnityEditor; +using UnityEngine; +using UnityEditor.SceneManagement; +using System.Collections.Generic; +using System.Linq; + +public class SceneObjectLocatorWindow : EditorWindow +{ + private enum Tab { Puzzles, Items } + private Tab currentTab = Tab.Puzzles; + + private List puzzleBehaviours = new List(); + private List pickupInfos = new List(); + private Vector2 scrollPos; + + [MenuItem("Tools/Scene Object Locator")] + public static void ShowWindow() + { + var window = GetWindow("Scene Object Locator"); + window.minSize = new Vector2(600, 400); + window.maxSize = new Vector2(1200, 800); + window.position = new Rect(120, 120, 700, 500); + } + + private void OnEnable() + { + RefreshSceneObjects(); + EditorSceneManager.sceneOpened += (scene, mode) => RefreshSceneObjects(); + EditorSceneManager.activeSceneChanged += (oldScene, newScene) => RefreshSceneObjects(); + } + + private void OnDisable() + { + EditorSceneManager.sceneOpened -= (scene, mode) => RefreshSceneObjects(); + EditorSceneManager.activeSceneChanged -= (oldScene, newScene) => RefreshSceneObjects(); + } + + private void RefreshSceneObjects() + { + puzzleBehaviours = FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None).ToList(); + var pickups = FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None); + pickupInfos.Clear(); + foreach (var pickup in pickups) + { + var go = pickup.gameObject; + bool hasCombine = go.GetComponent() != null; + bool hasSlot = go.GetComponent() != null; + pickupInfos.Add(new PickupInfo + { + pickup = pickup, + hasCombine = hasCombine, + hasSlot = hasSlot + }); + } + Repaint(); + } + + private void OnGUI() + { + currentTab = (Tab)GUILayout.Toolbar((int)currentTab, new[] { "Puzzles", "Items" }); + GUILayout.Space(8); + scrollPos = EditorGUILayout.BeginScrollView(scrollPos); + if (currentTab == Tab.Puzzles) + DrawPuzzleTab(); + else + DrawItemsTab(); + EditorGUILayout.EndScrollView(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button("Refresh")) + { + RefreshSceneObjects(); + } + } + + private void DrawPuzzleTab() + { + if (puzzleBehaviours.Count == 0) + { + EditorGUILayout.HelpBox("No ObjectiveStepBehaviour objects found in the scene.", MessageType.Info); + return; + } + foreach (var obj in puzzleBehaviours) + { + if (obj == null) continue; + var go = obj.gameObject; + EditorGUILayout.BeginVertical("box"); + EditorGUILayout.LabelField($"GameObject: {go.name}", EditorStyles.boldLabel); + EditorGUILayout.LabelField($"Path: {GetHierarchyPath(go)}"); + if (obj.stepData != null) + { + EditorGUILayout.LabelField($"Step: {obj.stepData.displayName} ({obj.stepData.stepId})"); + } + else + { + EditorGUILayout.LabelField("Step: [None]", EditorStyles.miniLabel); + } + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Ping Object", GUILayout.Width(120))) + { + Selection.activeObject = go; + EditorGUIUtility.PingObject(go); + } + if (obj.stepData != null && GUILayout.Button("Ping StepSO", GUILayout.Width(120))) + { + Selection.activeObject = obj.stepData; + EditorGUIUtility.PingObject(obj.stepData); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + GUILayout.Space(4); + } + } + + private void DrawItemsTab() + { + if (pickupInfos.Count == 0) + { + EditorGUILayout.HelpBox("No Pickup objects found in the scene.", MessageType.Info); + return; + } + foreach (var info in pickupInfos) + { + if (info.pickup == null) continue; + var go = info.pickup.gameObject; + EditorGUILayout.BeginVertical("box"); + EditorGUILayout.LabelField($"GameObject: {go.name}", EditorStyles.boldLabel); + EditorGUILayout.LabelField($"Path: {GetHierarchyPath(go)}"); + string types = ""; + if (info.hasCombine) types += "Combine"; + if (info.hasSlot) types += (types.Length > 0 ? ", " : "") + "Slot"; + EditorGUILayout.LabelField($"Types: {(string.IsNullOrEmpty(types) ? "Pickup" : types)}"); + if (info.pickup.itemData != null) + { + EditorGUILayout.LabelField($"Item: {info.pickup.itemData.itemName}"); + } + else + { + EditorGUILayout.LabelField("Item: [None]", EditorStyles.miniLabel); + } + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Ping Object", GUILayout.Width(120))) + { + Selection.activeObject = go; + EditorGUIUtility.PingObject(go); + } + if (info.pickup.itemData != null && GUILayout.Button("Ping ItemData", GUILayout.Width(120))) + { + Selection.activeObject = info.pickup.itemData; + EditorGUIUtility.PingObject(info.pickup.itemData); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + GUILayout.Space(4); + } + } + + private string GetHierarchyPath(GameObject go) + { + string path = go.name; + Transform t = go.transform.parent; + while (t != null) + { + path = t.name + "/" + path; + t = t.parent; + } + return path; + } + + private class PickupInfo + { + public Pickup pickup; + public bool hasCombine; + public bool hasSlot; + } +} + diff --git a/Assets/Editor/SceneObjectLocatorWindow.cs.meta b/Assets/Editor/SceneObjectLocatorWindow.cs.meta new file mode 100644 index 00000000..0eabd03b --- /dev/null +++ b/Assets/Editor/SceneObjectLocatorWindow.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0e3c240fa2f548b0a79617ac8e52a205 +timeCreated: 1757502956 \ No newline at end of file diff --git a/Assets/External/AstarPathfindingProject/Core/AI/AIBase.cs b/Assets/External/AstarPathfindingProject/Core/AI/AIBase.cs index c9d3adc4..e02d81b0 100644 --- a/Assets/External/AstarPathfindingProject/Core/AI/AIBase.cs +++ b/Assets/External/AstarPathfindingProject/Core/AI/AIBase.cs @@ -425,7 +425,7 @@ namespace Pathfinding { // If gravity is used depends on a lot of things. // For example when a non-kinematic rigidbody is used then the rigidbody will apply the gravity itself // Note that the gravity can contain NaN's, which is why the comparison uses !(a==b) instead of just a!=b. - usingGravity = !(gravity == Vector3.zero) && (!updatePosition || ((rigid == null || rigid.isKinematic) && (rigid2D == null || rigid2D.isKinematic))); + usingGravity = !(gravity == Vector3.zero) && (!updatePosition || ((rigid == null || rigid.isKinematic) && (rigid2D == null || rigid2D.bodyType == RigidbodyType2D.Kinematic))); if (rigid == null && rigid2D == null && canMove) { Vector3 nextPosition; Quaternion nextRotation; diff --git a/Assets/External/AstarPathfindingProject/Core/AstarPath.cs b/Assets/External/AstarPathfindingProject/Core/AstarPath.cs index 029dc5b1..a1eb673b 100644 --- a/Assets/External/AstarPathfindingProject/Core/AstarPath.cs +++ b/Assets/External/AstarPathfindingProject/Core/AstarPath.cs @@ -677,7 +677,7 @@ public class AstarPath : VersionedMonoBehaviour { /// public static void FindAstarPath () { if (Application.isPlaying) return; - if (active == null) active = GameObject.FindObjectOfType(); + if (active == null) active = FindFirstObjectByType(); if (active != null && (active.data.graphs == null || active.data.graphs.Length == 0)) active.data.DeserializeGraphs(); } @@ -1222,7 +1222,7 @@ public class AstarPath : VersionedMonoBehaviour { // Very important to set this. Ensures the singleton pattern holds active = this; - if (FindObjectsOfType(typeof(AstarPath)).Length > 1) { + if (FindObjectsByType(FindObjectsSortMode.None).Length > 1) { Debug.LogError("You should NOT have more than one AstarPath component in the scene at any time.\n" + "This can cause serious errors since the AstarPath component builds around a singleton pattern."); } diff --git a/Assets/External/AstarPathfindingProject/Core/Misc/GraphModifier.cs b/Assets/External/AstarPathfindingProject/Core/Misc/GraphModifier.cs index ca8af4ad..d3c735f3 100644 --- a/Assets/External/AstarPathfindingProject/Core/Misc/GraphModifier.cs +++ b/Assets/External/AstarPathfindingProject/Core/Misc/GraphModifier.cs @@ -39,7 +39,7 @@ namespace Pathfinding { } public static void FindAllModifiers () { - var allModifiers = FindObjectsOfType(typeof(GraphModifier)) as GraphModifier[]; + var allModifiers = FindObjectsByType(FindObjectsSortMode.None) as GraphModifier[]; for (int i = 0; i < allModifiers.Length; i++) { if (allModifiers[i].enabled) allModifiers[i].OnEnable(); diff --git a/Assets/External/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs b/Assets/External/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs index b1424c8a..8308a7a0 100644 --- a/Assets/External/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs +++ b/Assets/External/AstarPathfindingProject/Core/Serialization/JsonSerializer.cs @@ -127,7 +127,7 @@ namespace Pathfinding.Serialization { } if (!string.IsNullOrEmpty(guid)) { - UnityReferenceHelper[] helpers = UnityEngine.Object.FindObjectsOfType(typeof(UnityReferenceHelper)) as UnityReferenceHelper[]; + UnityReferenceHelper[] helpers = UnityEngine.Object.FindObjectsByType(FindObjectsSortMode.None) as UnityReferenceHelper[]; for (int i = 0; i < helpers.Length; i++) { if (helpers[i].GetGUID() == guid) { diff --git a/Assets/External/AstarPathfindingProject/Core/Serialization/TinyJson.cs b/Assets/External/AstarPathfindingProject/Core/Serialization/TinyJson.cs index d3d07aae..25814cc6 100644 --- a/Assets/External/AstarPathfindingProject/Core/Serialization/TinyJson.cs +++ b/Assets/External/AstarPathfindingProject/Core/Serialization/TinyJson.cs @@ -341,7 +341,7 @@ namespace Pathfinding.Serialization { } #if UNITY_2020_1_OR_NEWER - foreach (var helper in UnityEngine.Object.FindObjectsOfType(true)) + foreach (var helper in UnityEngine.Object.FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None)) #else foreach (var helper in UnityEngine.Object.FindObjectsOfType()) #endif diff --git a/Assets/External/AstarPathfindingProject/ExampleScenes/ExampleScripts/TargetMover.cs b/Assets/External/AstarPathfindingProject/ExampleScenes/ExampleScripts/TargetMover.cs index e28ba7ca..e9314e29 100644 --- a/Assets/External/AstarPathfindingProject/ExampleScenes/ExampleScripts/TargetMover.cs +++ b/Assets/External/AstarPathfindingProject/ExampleScenes/ExampleScripts/TargetMover.cs @@ -29,7 +29,7 @@ namespace Pathfinding { cam = Camera.main; // Slightly inefficient way of finding all AIs, but this is just an example script, so it doesn't matter much. // FindObjectsOfType does not support interfaces unfortunately. - ais = FindObjectsOfType().OfType().ToArray(); + ais = FindObjectsByType(FindObjectsSortMode.None).OfType().ToArray(); useGUILayout = false; } diff --git a/Assets/External/AstarPathfindingProject/Navmesh/RelevantGraphSurface.cs b/Assets/External/AstarPathfindingProject/Navmesh/RelevantGraphSurface.cs index 425a0b1c..0f72bd8e 100644 --- a/Assets/External/AstarPathfindingProject/Navmesh/RelevantGraphSurface.cs +++ b/Assets/External/AstarPathfindingProject/Navmesh/RelevantGraphSurface.cs @@ -73,7 +73,7 @@ namespace Pathfinding { } public static void FindAllGraphSurfaces () { - var srf = GameObject.FindObjectsOfType(typeof(RelevantGraphSurface)) as RelevantGraphSurface[]; + var srf = GameObject.FindObjectsByType(FindObjectsSortMode.None) as RelevantGraphSurface[]; for (int i = 0; i < srf.Length; i++) { srf[i].OnDisable(); diff --git a/Assets/External/AstarPathfindingProject/Utilities/UnityReferenceHelper.cs b/Assets/External/AstarPathfindingProject/Utilities/UnityReferenceHelper.cs index 53c18660..f46f7a04 100644 --- a/Assets/External/AstarPathfindingProject/Utilities/UnityReferenceHelper.cs +++ b/Assets/External/AstarPathfindingProject/Utilities/UnityReferenceHelper.cs @@ -27,7 +27,7 @@ namespace Pathfinding { } else if (gameObject.scene.name != null) { // Create a new GUID if there are duplicates in the scene. // Don't do this if this is a prefab (scene.name == null) - foreach (UnityReferenceHelper urh in FindObjectsOfType(typeof(UnityReferenceHelper)) as UnityReferenceHelper[]) { + foreach (UnityReferenceHelper urh in FindObjectsByType(FindObjectsSortMode.None) as UnityReferenceHelper[]) { if (urh != this && guid == urh.guid) { guid = Pathfinding.Util.Guid.NewGuid().ToString(); Debug.Log("Created new GUID - " + guid, this); diff --git a/Assets/Scripts/BubbleS.meta b/Assets/Prefabs/Minigames/DivingForPictures.meta similarity index 77% rename from Assets/Scripts/BubbleS.meta rename to Assets/Prefabs/Minigames/DivingForPictures.meta index 286a34e8..258c4a62 100644 --- a/Assets/Scripts/BubbleS.meta +++ b/Assets/Prefabs/Minigames/DivingForPictures.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bcdb9a3fdaba40459aa46e01c956b531 +guid: d12218407e0a4404fad5368a3e32bb37 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile1.prefab b/Assets/Prefabs/Minigames/DivingForPictures/Tile1.prefab new file mode 100644 index 00000000..3b51611e --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile1.prefab @@ -0,0 +1,209 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864595161669782950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7111145574660306503} + - component: {fileID: 3889795708575321074} + m_Layer: 0 + m_Name: Left_Tile2_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7111145574660306503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.77, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3889795708575321074 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 7559449286846427561, guid: e3d18475ab86b1246912f497417465f8, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.37, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2171518497100337372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1003080013996268193} + - component: {fileID: 4856205316150460481} + m_Layer: 0 + m_Name: Right_Tile1_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1003080013996268193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.95, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4856205316150460481 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.65, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2956826569642009690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4925660644986369589} + m_Layer: 0 + m_Name: Tile1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4925660644986369589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2956826569642009690} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7111145574660306503} + - {fileID: 1003080013996268193} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile1.prefab.meta b/Assets/Prefabs/Minigames/DivingForPictures/Tile1.prefab.meta new file mode 100644 index 00000000..7c644dde --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 661c5018e2409034d92de025b7ac57b7 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile1_flipped.prefab b/Assets/Prefabs/Minigames/DivingForPictures/Tile1_flipped.prefab new file mode 100644 index 00000000..caad24a4 --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile1_flipped.prefab @@ -0,0 +1,209 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864595161669782950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7111145574660306503} + - component: {fileID: 3889795708575321074} + m_Layer: 0 + m_Name: Left_Tile2_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7111145574660306503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.093, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3889795708575321074 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 7559449286846427561, guid: e3d18475ab86b1246912f497417465f8, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.37, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2171518497100337372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1003080013996268193} + - component: {fileID: 4856205316150460481} + m_Layer: 0 + m_Name: Right_Tile1_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1003080013996268193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.627, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4856205316150460481 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.65, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2956826569642009690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4925660644986369589} + m_Layer: 0 + m_Name: Tile1_flipped + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4925660644986369589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2956826569642009690} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7111145574660306503} + - {fileID: 1003080013996268193} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile1_flipped.prefab.meta b/Assets/Prefabs/Minigames/DivingForPictures/Tile1_flipped.prefab.meta new file mode 100644 index 00000000..38c080d5 --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile1_flipped.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c24515e40c664f645bdef28a10d1b882 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile2.prefab b/Assets/Prefabs/Minigames/DivingForPictures/Tile2.prefab new file mode 100644 index 00000000..29be29a0 --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile2.prefab @@ -0,0 +1,209 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864595161669782950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7111145574660306503} + - component: {fileID: 3889795708575321074} + m_Layer: 0 + m_Name: Left_Tile2_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7111145574660306503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.64, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3889795708575321074 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.37, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2171518497100337372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1003080013996268193} + - component: {fileID: 4856205316150460481} + m_Layer: 0 + m_Name: Right_Tile1_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1003080013996268193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 3.08, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4856205316150460481 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 2764166773722941650, guid: f7ec8080b46b20f459d02e73b12f1694, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.65, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2956826569642009690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4925660644986369589} + m_Layer: 0 + m_Name: Tile2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4925660644986369589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2956826569642009690} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7111145574660306503} + - {fileID: 1003080013996268193} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile2.prefab.meta b/Assets/Prefabs/Minigames/DivingForPictures/Tile2.prefab.meta new file mode 100644 index 00000000..52121fea --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile2.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4827a98c801e6ea42a9ac44eb9c176ff +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile2_flipped.prefab b/Assets/Prefabs/Minigames/DivingForPictures/Tile2_flipped.prefab new file mode 100644 index 00000000..666262eb --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile2_flipped.prefab @@ -0,0 +1,209 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864595161669782950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7111145574660306503} + - component: {fileID: 3889795708575321074} + m_Layer: 0 + m_Name: Left_Tile2_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7111145574660306503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.95, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3889795708575321074 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.37, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2171518497100337372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1003080013996268193} + - component: {fileID: 4856205316150460481} + m_Layer: 0 + m_Name: Right_Tile1_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1003080013996268193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.77, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4856205316150460481 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 2764166773722941650, guid: f7ec8080b46b20f459d02e73b12f1694, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.65, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2956826569642009690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4925660644986369589} + m_Layer: 0 + m_Name: Tile2_flipped + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4925660644986369589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2956826569642009690} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7111145574660306503} + - {fileID: 1003080013996268193} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile2_flipped.prefab.meta b/Assets/Prefabs/Minigames/DivingForPictures/Tile2_flipped.prefab.meta new file mode 100644 index 00000000..cb627e2e --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile2_flipped.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 43ed47cbe958b9f46b462e2fca2382c5 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile3.prefab b/Assets/Prefabs/Minigames/DivingForPictures/Tile3.prefab new file mode 100644 index 00000000..8bc8ab36 --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile3.prefab @@ -0,0 +1,209 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864595161669782950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7111145574660306503} + - component: {fileID: 3889795708575321074} + m_Layer: 0 + m_Name: Left_Tile2_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7111145574660306503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.62, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3889795708575321074 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.37, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2171518497100337372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1003080013996268193} + - component: {fileID: 4856205316150460481} + m_Layer: 0 + m_Name: Right_Tile1_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1003080013996268193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.95, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4856205316150460481 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.65, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2956826569642009690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4925660644986369589} + m_Layer: 0 + m_Name: Tile3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4925660644986369589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2956826569642009690} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7111145574660306503} + - {fileID: 1003080013996268193} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile3.prefab.meta b/Assets/Prefabs/Minigames/DivingForPictures/Tile3.prefab.meta new file mode 100644 index 00000000..2154a85d --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile3.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f772f2aebd38b44ca31063d196c77c1 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile3_flipped.prefab b/Assets/Prefabs/Minigames/DivingForPictures/Tile3_flipped.prefab new file mode 100644 index 00000000..0dd8beea --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile3_flipped.prefab @@ -0,0 +1,209 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &864595161669782950 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7111145574660306503} + - component: {fileID: 3889795708575321074} + m_Layer: 0 + m_Name: Left_Tile2_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7111145574660306503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.95, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3889795708575321074 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 864595161669782950} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.37, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2171518497100337372 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1003080013996268193} + - component: {fileID: 4856205316150460481} + m_Layer: 0 + m_Name: Right_Tile1_0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1003080013996268193 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.62, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4925660644986369589} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &4856205316150460481 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2171518497100337372} + 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_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 2.65, y: 5} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1 &2956826569642009690 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4925660644986369589} + m_Layer: 0 + m_Name: Tile3_flipped + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4925660644986369589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2956826569642009690} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 1, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 7111145574660306503} + - {fileID: 1003080013996268193} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180} diff --git a/Assets/Prefabs/Minigames/DivingForPictures/Tile3_flipped.prefab.meta b/Assets/Prefabs/Minigames/DivingForPictures/Tile3_flipped.prefab.meta new file mode 100644 index 00000000..07742fbe --- /dev/null +++ b/Assets/Prefabs/Minigames/DivingForPictures/Tile3_flipped.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7f7f10ca24a5afe46be797daea64111a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/MiniGames/DivingForPictures.unity b/Assets/Scenes/MiniGames/DivingForPictures.unity index 9e948800..8725d2a4 100644 --- a/Assets/Scenes/MiniGames/DivingForPictures.unity +++ b/Assets/Scenes/MiniGames/DivingForPictures.unity @@ -1150,6 +1150,68 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &1679185997 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1679185998} + - component: {fileID: 1679185999} + m_Layer: 0 + m_Name: TileSpawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1679185998 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1679185997} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1679185999 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1679185997} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbe5f5d548d44d93b3f90be6542205d8, type: 3} + m_Name: + m_EditorClassIdentifier: + tilePrefabs: + - {fileID: 2956826569642009690, guid: 661c5018e2409034d92de025b7ac57b7, type: 3} + - {fileID: 2956826569642009690, guid: c24515e40c664f645bdef28a10d1b882, type: 3} + - {fileID: 2956826569642009690, guid: 4827a98c801e6ea42a9ac44eb9c176ff, type: 3} + - {fileID: 2956826569642009690, guid: 43ed47cbe958b9f46b462e2fca2382c5, type: 3} + - {fileID: 2956826569642009690, guid: 4f772f2aebd38b44ca31063d196c77c1, type: 3} + - {fileID: 2956826569642009690, guid: 7f7f10ca24a5afe46be797daea64111a, type: 3} + initialTileCount: 3 + tileSpawnBuffer: 1 + moveSpeed: 3 + speedUpFactor: 0.2 + speedUpInterval: 2 + onTileSpawned: + m_PersistentCalls: + m_Calls: [] + onTileDestroyed: + m_PersistentCalls: + m_Calls: [] --- !u!1 &1834056336 GameObject: m_ObjectHideFlags: 0 @@ -1385,3 +1447,4 @@ SceneRoots: - {fileID: 747976397} - {fileID: 1003335105} - {fileID: 2106431002} + - {fileID: 1679185998} diff --git a/Assets/Scripts/BubbleS/Bubble.cs b/Assets/Scripts/BubbleS/Bubble.cs deleted file mode 100644 index 9464caf1..00000000 --- a/Assets/Scripts/BubbleS/Bubble.cs +++ /dev/null @@ -1,74 +0,0 @@ -using UnityEngine; - -/// -/// Represents a single bubble, handling its movement, wobble effect, scaling, and sprite assignment. -/// -public class Bubble : MonoBehaviour -{ - public float speed = 1f; - public float wobbleSpeed = 1f; - private SpriteRenderer spriteRenderer; - private SpriteRenderer bottleSpriteRenderer; - private float timeOffset; - private float minScale = 0.2f; - private float maxScale = 1.2f; - - void Awake() - { - // Cache references and randomize time offset for wobble - spriteRenderer = GetComponent(); - timeOffset = Random.value * 100f; - // Find the child named "BottleSprite" and get its SpriteRenderer - Transform bottleSpriteTransform = transform.Find("BubbleSprite"); - if (bottleSpriteTransform != null) - { - bottleSpriteRenderer = bottleSpriteTransform.GetComponent(); - } - } - - void Update() - { - // Move bubble upward - transform.position += Vector3.up * speed * Time.deltaTime; - // Wobble effect (smooth oscillation between min and max scale) - float t = (Mathf.Sin((Time.time + timeOffset) * wobbleSpeed) + 1f) * 0.5f; // t in [0,1] - float newScale = Mathf.Lerp(minScale, maxScale, t); - transform.localScale = Vector3.one * newScale; - // Destroy when off screen - if (transform.position.y > Camera.main.orthographicSize + 2f) - { - Destroy(gameObject); - } - } - - /// - /// Sets the main sprite for the bubble. - /// - /// Sprite to assign. - public void SetSprite(Sprite sprite) - { - if (spriteRenderer != null) - spriteRenderer.sprite = sprite; - } - - /// - /// Sets the sprite for the child "BottleSprite" renderer. - /// - /// Sprite to assign. - public void SetBottleSprite(Sprite sprite) - { - if (bottleSpriteRenderer != null) - bottleSpriteRenderer.sprite = sprite; - } - - /// - /// Sets the minimum and maximum scale for the wobble effect. - /// - /// Minimum scale. - /// Maximum scale. - public void SetWobbleScaleLimits(float min, float max) - { - minScale = min; - maxScale = max; - } -} diff --git a/Assets/Scripts/BubbleS/BubbleSpawner.cs b/Assets/Scripts/BubbleS/BubbleSpawner.cs deleted file mode 100644 index 6268b58b..00000000 --- a/Assets/Scripts/BubbleS/BubbleSpawner.cs +++ /dev/null @@ -1,74 +0,0 @@ -using UnityEngine; - -/// -/// Spawns bubbles at intervals, randomizing their properties and assigning a random sprite to each. -/// -public class BubbleSpawner : MonoBehaviour -{ - public Bubble bubblePrefab; - public Sprite[] bubbleSprites; // Assign in inspector - public float spawnInterval = 0.3f; - public Vector2 speedRange = new Vector2(0.5f, 2f); - public Vector2 scaleRange = new Vector2(0.3f, 0.7f); - public Vector2 wobbleSpeedRange = new Vector2(1f, 3f); - public Vector2 wobbleAmountRange = new Vector2(0.05f, 0.15f); - public float spawnXMin = -3.5f; - public float spawnXMax = 3.5f; - public float spawnY = -5f; - public float wobbleMinScale = 0.2f; - public float wobbleMaxScale = 1.2f; - - private float timer; - private float nextSpawnInterval; - - void Start() - { - // Initialize the next spawn interval - nextSpawnInterval = GetRandomizedInterval(); - } - - void Update() - { - timer += Time.deltaTime; - if (timer >= nextSpawnInterval) - { - SpawnBubble(); - timer = 0f; - nextSpawnInterval = GetRandomizedInterval(); - } - } - - /// - /// Returns a randomized interval for bubble spawning. - /// - /// Randomized interval in seconds. - float GetRandomizedInterval() - { - return spawnInterval * Random.Range(0.8f, 1.2f); - } - - /// - /// Spawns a bubble with randomized properties and assigns a random sprite. - /// - void SpawnBubble() - { - float x = Random.Range(spawnXMin, spawnXMax); - Vector3 spawnPos = new Vector3(x, spawnY, 0f); - Bubble bubble = Instantiate(bubblePrefab, spawnPos, Quaternion.identity, transform); - // Randomize bubble properties - bubble.speed = Random.Range(speedRange.x, speedRange.y); - bubble.wobbleSpeed = Random.Range(wobbleSpeedRange.x, wobbleSpeedRange.y); - float scale = Random.Range(scaleRange.x, scaleRange.y); - bubble.transform.localScale = Vector3.one * scale; - // Assign random sprite to BottleSprite - if (bubbleSprites != null && bubbleSprites.Length > 0) - { - Sprite randomSprite = bubbleSprites[Random.Range(0, bubbleSprites.Length)]; - bubble.SetBottleSprite(randomSprite); - } - // Random rotation - bubble.transform.rotation = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f)); - // Pass min/max scale for wobble clamping - bubble.SetWobbleScaleLimits(wobbleMinScale, wobbleMaxScale); - } -} diff --git a/Assets/Scripts/Minigames.meta b/Assets/Scripts/Minigames.meta new file mode 100644 index 00000000..e64dc066 --- /dev/null +++ b/Assets/Scripts/Minigames.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 966ee51822984f3c9eb370193d98ab17 +timeCreated: 1757488369 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/DivingForPictures.meta b/Assets/Scripts/Minigames/DivingForPictures.meta new file mode 100644 index 00000000..5012b54b --- /dev/null +++ b/Assets/Scripts/Minigames/DivingForPictures.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 59dcc6f7af2c4e49a06f26fab743e664 +timeCreated: 1757488376 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/DivingForPictures/Bubble.cs b/Assets/Scripts/Minigames/DivingForPictures/Bubble.cs new file mode 100644 index 00000000..a84c4907 --- /dev/null +++ b/Assets/Scripts/Minigames/DivingForPictures/Bubble.cs @@ -0,0 +1,77 @@ +using UnityEngine; + +namespace Minigames.DivingForPictures +{ + /// + /// Represents a single bubble, handling its movement, wobble effect, scaling, and sprite assignment. + /// + public class Bubble : MonoBehaviour + { + public float speed = 1f; + public float wobbleSpeed = 1f; + private SpriteRenderer spriteRenderer; + private SpriteRenderer bottleSpriteRenderer; + private float timeOffset; + private float minScale = 0.2f; + private float maxScale = 1.2f; + + void Awake() + { + // Cache references and randomize time offset for wobble + spriteRenderer = GetComponent(); + timeOffset = Random.value * 100f; + // Find the child named "BottleSprite" and get its SpriteRenderer + Transform bottleSpriteTransform = transform.Find("BubbleSprite"); + if (bottleSpriteTransform != null) + { + bottleSpriteRenderer = bottleSpriteTransform.GetComponent(); + } + } + + void Update() + { + // Move bubble upward + transform.position += Vector3.up * speed * Time.deltaTime; + // Wobble effect (smooth oscillation between min and max scale) + float t = (Mathf.Sin((Time.time + timeOffset) * wobbleSpeed) + 1f) * 0.5f; // t in [0,1] + float newScale = Mathf.Lerp(minScale, maxScale, t); + transform.localScale = Vector3.one * newScale; + // Destroy when off screen + if (transform.position.y > Camera.main.orthographicSize + 2f) + { + Destroy(gameObject); + } + } + + /// + /// Sets the main sprite for the bubble. + /// + /// Sprite to assign. + public void SetSprite(Sprite sprite) + { + if (spriteRenderer != null) + spriteRenderer.sprite = sprite; + } + + /// + /// Sets the sprite for the child "BottleSprite" renderer. + /// + /// Sprite to assign. + public void SetBottleSprite(Sprite sprite) + { + if (bottleSpriteRenderer != null) + bottleSpriteRenderer.sprite = sprite; + } + + /// + /// Sets the minimum and maximum scale for the wobble effect. + /// + /// Minimum scale. + /// Maximum scale. + public void SetWobbleScaleLimits(float min, float max) + { + minScale = min; + maxScale = max; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/BubbleS/Bubble.cs.meta b/Assets/Scripts/Minigames/DivingForPictures/Bubble.cs.meta similarity index 100% rename from Assets/Scripts/BubbleS/Bubble.cs.meta rename to Assets/Scripts/Minigames/DivingForPictures/Bubble.cs.meta diff --git a/Assets/Scripts/Minigames/DivingForPictures/BubbleSpawner.cs b/Assets/Scripts/Minigames/DivingForPictures/BubbleSpawner.cs new file mode 100644 index 00000000..5ad09d36 --- /dev/null +++ b/Assets/Scripts/Minigames/DivingForPictures/BubbleSpawner.cs @@ -0,0 +1,78 @@ +using UnityEngine; + +namespace Minigames.DivingForPictures +{ + /// + /// Spawns bubbles at intervals, randomizing their properties and assigning a random sprite to each. + /// + public class BubbleSpawner : MonoBehaviour + { + public Bubble bubblePrefab; + public Sprite[] bubbleSprites; // Assign in inspector + public float spawnInterval = 0.3f; + public Vector2 speedRange = new Vector2(0.5f, 2f); + public Vector2 scaleRange = new Vector2(0.3f, 0.7f); + public Vector2 wobbleSpeedRange = new Vector2(1f, 3f); + public Vector2 wobbleAmountRange = new Vector2(0.05f, 0.15f); + public float spawnXMin = -3.5f; + public float spawnXMax = 3.5f; + public float spawnY = -5f; + public float wobbleMinScale = 0.2f; + public float wobbleMaxScale = 1.2f; + + private float _timer; + private float _nextSpawnInterval; + + void Start() + { + // Initialize the next spawn interval + _nextSpawnInterval = GetRandomizedInterval(); + } + + void Update() + { + _timer += Time.deltaTime; + if (_timer >= _nextSpawnInterval) + { + SpawnBubble(); + _timer = 0f; + _nextSpawnInterval = GetRandomizedInterval(); + } + } + + /// + /// Returns a randomized interval for bubble spawning. + /// + /// Randomized interval in seconds. + float GetRandomizedInterval() + { + return spawnInterval * Random.Range(0.8f, 1.2f); + } + + /// + /// Spawns a bubble with randomized properties and assigns a random sprite. + /// + void SpawnBubble() + { + float x = Random.Range(spawnXMin, spawnXMax); + Vector3 spawnPos = new Vector3(x, spawnY, 0f); + Bubble bubble = Instantiate(bubblePrefab, spawnPos, Quaternion.identity, transform); + // Randomize bubble properties + bubble.speed = Random.Range(speedRange.x, speedRange.y); + bubble.wobbleSpeed = Random.Range(wobbleSpeedRange.x, wobbleSpeedRange.y); + float scale = Random.Range(scaleRange.x, scaleRange.y); + bubble.transform.localScale = Vector3.one * scale; + // Assign random sprite to BottleSprite + if (bubbleSprites != null && bubbleSprites.Length > 0) + { + Sprite randomSprite = bubbleSprites[Random.Range(0, bubbleSprites.Length)]; + bubble.SetBottleSprite(randomSprite); + } + + // Random rotation + bubble.transform.rotation = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f)); + // Pass min/max scale for wobble clamping + bubble.SetWobbleScaleLimits(wobbleMinScale, wobbleMaxScale); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/BubbleS/BubbleSpawner.cs.meta b/Assets/Scripts/Minigames/DivingForPictures/BubbleSpawner.cs.meta similarity index 100% rename from Assets/Scripts/BubbleS/BubbleSpawner.cs.meta rename to Assets/Scripts/Minigames/DivingForPictures/BubbleSpawner.cs.meta diff --git a/Assets/Scripts/Minigames/DivingForPictures/PlayerController.cs b/Assets/Scripts/Minigames/DivingForPictures/PlayerController.cs new file mode 100644 index 00000000..899fea46 --- /dev/null +++ b/Assets/Scripts/Minigames/DivingForPictures/PlayerController.cs @@ -0,0 +1,94 @@ +using UnityEngine; + +namespace Minigames.DivingForPictures +{ + /// + /// Handles endless descender movement in response to tap and hold input events. + /// Moves the character horizontally to follow the finger or tap position. + /// + public class PlayerController : MonoBehaviour, ITouchInputConsumer + { + private float _targetFingerX; + private bool _isTouchActive; + private float _originY; + + void Awake() + { + _originY = transform.position.y; + } + + void Start() + { + // Register as default consumer for input + InputManager.Instance?.SetDefaultConsumer(this); + // Initialize target to current position + _targetFingerX = transform.position.x; + _isTouchActive = false; + } + + /// + /// Handles tap input. Moves to the tapped X position. + /// + public void OnTap(Vector2 worldPosition) + { + Debug.Log($"[EndlessDescenderController] OnTap at {worldPosition}"); + _targetFingerX = Mathf.Clamp(worldPosition.x, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); + _isTouchActive = true; + } + + /// + /// Handles the start of a hold input. Begins tracking the finger. + /// + public void OnHoldStart(Vector2 worldPosition) + { + Debug.Log($"[EndlessDescenderController] OnHoldStart at {worldPosition}"); + _targetFingerX = Mathf.Clamp(worldPosition.x, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); + _isTouchActive = true; + } + + /// + /// Handles hold move input. Updates the target X position as the finger moves. + /// + public void OnHoldMove(Vector2 worldPosition) + { + Debug.Log($"[EndlessDescenderController] OnHoldMove at {worldPosition}"); + _targetFingerX = Mathf.Clamp(worldPosition.x, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); + } + + /// + /// Handles the end of a hold input. Stops tracking. + /// + public void OnHoldEnd(Vector2 worldPosition) + { + Debug.Log($"[EndlessDescenderController] OnHoldEnd at {worldPosition}"); + _isTouchActive = false; + } + + void Update() + { + if (!_isTouchActive) return; + float currentX = transform.position.x; + float lerpSpeed = GameManager.Instance.EndlessDescenderLerpSpeed; + float maxOffset = GameManager.Instance.EndlessDescenderMaxOffset; + float exponent = GameManager.Instance.EndlessDescenderSpeedExponent; + float targetX = _targetFingerX; + float offset = targetX - currentX; + offset = Mathf.Clamp(offset, -maxOffset, maxOffset); + float absOffset = Mathf.Abs(offset); + float t = Mathf.Pow(absOffset / maxOffset, exponent); // Non-linear drop-off + float moveStep = Mathf.Sign(offset) * maxOffset * t * Time.deltaTime * lerpSpeed; + // Prevent overshooting + moveStep = Mathf.Clamp(moveStep, -absOffset, absOffset); + float newX = currentX + moveStep; + newX = Mathf.Clamp(newX, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); + float newY = _originY; + // Add vertical offset from WobbleBehavior if present + WobbleBehavior wobble = GetComponent(); + if (wobble != null) + { + newY += wobble.VerticalOffset; + } + transform.position = new Vector3(newX, newY, transform.position.z); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Movement/EndlessDescenderController.cs.meta b/Assets/Scripts/Minigames/DivingForPictures/PlayerController.cs.meta similarity index 100% rename from Assets/Scripts/Movement/EndlessDescenderController.cs.meta rename to Assets/Scripts/Minigames/DivingForPictures/PlayerController.cs.meta diff --git a/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs b/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs new file mode 100644 index 00000000..dc09fc37 --- /dev/null +++ b/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs @@ -0,0 +1,160 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Serialization; + +namespace Minigames.DivingForPictures +{ + /// + /// Spawns and manages trench wall tiles for the endless descender minigame. + /// + public class TrenchTileSpawner : MonoBehaviour + { + [Header("Tile Prefabs")] + [Tooltip("List of possible trench tile prefabs.")] + public List tilePrefabs; + + [Header("Tile Settings")] + private const float TileHeight = 5f; // Set to match prefab height + public int initialTileCount = 3; + public float tileSpawnBuffer = 1f; + + [Header("Movement Settings")] + public float moveSpeed = 3f; + public float speedUpFactor = 0.2f; + public float speedUpInterval = 10f; + + [FormerlySerializedAs("OnTileSpawned")] [Header("Events")] + public UnityEvent onTileSpawned; + [FormerlySerializedAs("OnTileDestroyed")] + public UnityEvent onTileDestroyed; + + private readonly List _activeTiles = new List(); + private readonly Dictionary _tileLastUsed = new Dictionary(); + private int _spawnCounter; + private float _speedUpTimer; + + private Camera _mainCamera; + private float _screenBottom; + private float _screenTop; + + void Start() + { + _mainCamera = Camera.main; + CalculateScreenBounds(); + for (int i = 0; i < initialTileCount; i++) + { + SpawnTileAtY(_screenBottom + i * TileHeight); + } + } + + void Update() + { + MoveTiles(); + HandleTileDestruction(); + HandleTileSpawning(); + HandleSpeedRamping(); + } + + private void CalculateScreenBounds() + { + Vector3 bottom = _mainCamera.ViewportToWorldPoint(new Vector3(0.5f, 0f, _mainCamera.nearClipPlane)); + Vector3 top = _mainCamera.ViewportToWorldPoint(new Vector3(0.5f, 1f, _mainCamera.nearClipPlane)); + _screenBottom = bottom.y; + _screenTop = top.y; + } + + private void MoveTiles() + { + float moveDelta = moveSpeed * Time.deltaTime; + foreach (var tile in _activeTiles) + { + if (tile != null) + { + tile.transform.position += Vector3.up * moveDelta; + } + } + } + + private void HandleTileDestruction() + { + if (_activeTiles.Count == 0) return; + GameObject topTile = _activeTiles[0]; + if (topTile.transform.position.y - TileHeight / 2 > _screenTop + tileSpawnBuffer) + { + _activeTiles.RemoveAt(0); + onTileDestroyed?.Invoke(topTile); + Destroy(topTile); + } + } + + private void HandleTileSpawning() + { + if (_activeTiles.Count == 0) return; + GameObject bottomTile = _activeTiles[^1]; + float bottomEdge = bottomTile.transform.position.y - TileHeight / 2; + if (bottomEdge > _screenBottom - tileSpawnBuffer) + { + float newY = bottomTile.transform.position.y - TileHeight; + SpawnTileAtY(newY); + } + } + + private void HandleSpeedRamping() + { + _speedUpTimer += Time.deltaTime; + if (_speedUpTimer >= speedUpInterval) + { + moveSpeed += speedUpFactor; + _speedUpTimer = 0f; + } + } + + private void SpawnTileAtY(float y) + { + int prefabIndex = GetWeightedRandomTileIndex(); + GameObject prefab = tilePrefabs[prefabIndex]; + // Use the prefab's original rotation + GameObject tile = Instantiate(prefab, new Vector3(0f, y, 0f), prefab.transform.rotation, transform); + _activeTiles.Add(tile); + _tileLastUsed[prefabIndex] = _spawnCounter++; + onTileSpawned?.Invoke(tile); + } + + private int GetWeightedRandomTileIndex() + { + // Weight tiles not used recently higher + int n = tilePrefabs.Count; + List weights = new List(n); + for (int i = 0; i < n; i++) + { + int lastUsed = _tileLastUsed.TryGetValue(i, out var value) ? value : -n; + int age = _spawnCounter - lastUsed; + float weight = Mathf.Clamp(age, 1, n * 2); // More unused = higher weight + weights.Add(weight); + } + float total = 0f; + foreach (var w in weights) total += w; + float r = Random.value * total; + for (int i = 0; i < n; i++) + { + if (r < weights[i]) return i; + r -= weights[i]; + } + return Random.Range(0, n); // fallback + } + +#if UNITY_EDITOR + void OnDrawGizmosSelected() + { + // Draw tile bounds for debugging + Gizmos.color = Color.cyan; + for (int i = 0; i < initialTileCount; i++) + { + Vector3 center = new Vector3(0f, _screenBottom + i * TileHeight, 0f); + Gizmos.DrawWireCube(center, new Vector3(10f, TileHeight, 1f)); + } + } +#endif + } +} diff --git a/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs.meta b/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs.meta new file mode 100644 index 00000000..059f9f3e --- /dev/null +++ b/Assets/Scripts/Minigames/DivingForPictures/TrenchTileSpawner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fbe5f5d548d44d93b3f90be6542205d8 +timeCreated: 1757492905 \ No newline at end of file diff --git a/Assets/Scripts/Movement/EndlessDescenderController.cs b/Assets/Scripts/Movement/EndlessDescenderController.cs deleted file mode 100644 index b50fcf94..00000000 --- a/Assets/Scripts/Movement/EndlessDescenderController.cs +++ /dev/null @@ -1,91 +0,0 @@ -using UnityEngine; - -/// -/// Handles endless descender movement in response to tap and hold input events. -/// Moves the character horizontally to follow the finger or tap position. -/// -public class EndlessDescenderController : MonoBehaviour, ITouchInputConsumer -{ - private float targetFingerX; - private bool isTouchActive; - private float originY; - - void Awake() - { - originY = transform.position.y; - } - - void Start() - { - // Register as default consumer for input - InputManager.Instance?.SetDefaultConsumer(this); - // Initialize target to current position - targetFingerX = transform.position.x; - isTouchActive = false; - } - - /// - /// Handles tap input. Moves to the tapped X position. - /// - public void OnTap(Vector2 worldPosition) - { - Debug.Log($"[EndlessDescenderController] OnTap at {worldPosition}"); - targetFingerX = Mathf.Clamp(worldPosition.x, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); - isTouchActive = true; - } - - /// - /// Handles the start of a hold input. Begins tracking the finger. - /// - public void OnHoldStart(Vector2 worldPosition) - { - Debug.Log($"[EndlessDescenderController] OnHoldStart at {worldPosition}"); - targetFingerX = Mathf.Clamp(worldPosition.x, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); - isTouchActive = true; - } - - /// - /// Handles hold move input. Updates the target X position as the finger moves. - /// - public void OnHoldMove(Vector2 worldPosition) - { - Debug.Log($"[EndlessDescenderController] OnHoldMove at {worldPosition}"); - targetFingerX = Mathf.Clamp(worldPosition.x, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); - } - - /// - /// Handles the end of a hold input. Stops tracking. - /// - public void OnHoldEnd(Vector2 worldPosition) - { - Debug.Log($"[EndlessDescenderController] OnHoldEnd at {worldPosition}"); - isTouchActive = false; - } - - void Update() - { - if (!isTouchActive) return; - float currentX = transform.position.x; - float lerpSpeed = GameManager.Instance.EndlessDescenderLerpSpeed; - float maxOffset = GameManager.Instance.EndlessDescenderMaxOffset; - float exponent = GameManager.Instance.EndlessDescenderSpeedExponent; - float targetX = targetFingerX; - float offset = targetX - currentX; - offset = Mathf.Clamp(offset, -maxOffset, maxOffset); - float absOffset = Mathf.Abs(offset); - float t = Mathf.Pow(absOffset / maxOffset, exponent); // Non-linear drop-off - float moveStep = Mathf.Sign(offset) * maxOffset * t * Time.deltaTime * lerpSpeed; - // Prevent overshooting - moveStep = Mathf.Clamp(moveStep, -absOffset, absOffset); - float newX = currentX + moveStep; - newX = Mathf.Clamp(newX, GameManager.Instance.EndlessDescenderClampXMin, GameManager.Instance.EndlessDescenderClampXMax); - float newY = originY; - // Add vertical offset from WobbleBehavior if present - WobbleBehavior wobble = GetComponent(); - if (wobble != null) - { - newY += wobble.VerticalOffset; - } - transform.position = new Vector3(newX, newY, transform.position.z); - } -}