diff --git a/Assets/Editor/CustomEditorsAndDrawers/EdgeAnchorEditor.cs b/Assets/Editor/CustomEditorsAndDrawers/EdgeAnchorEditor.cs index dd11aba6..64e7a629 100644 --- a/Assets/Editor/CustomEditorsAndDrawers/EdgeAnchorEditor.cs +++ b/Assets/Editor/CustomEditorsAndDrawers/EdgeAnchorEditor.cs @@ -1,6 +1,7 @@ using UnityEngine; using UnityEditor; using AppleHillsCamera; +using Minigames.BirdPooper; namespace Editor { @@ -16,7 +17,7 @@ namespace Editor EdgeAnchor edgeAnchor = (EdgeAnchor)target; // Check if there's an Obstacle component on the same GameObject - var obstacle = edgeAnchor.GetComponent(); + var obstacle = edgeAnchor.GetComponent(); if (obstacle != null) { diff --git a/Assets/Editor/Minigames.meta b/Assets/Editor/Minigames.meta new file mode 100644 index 00000000..77121b17 --- /dev/null +++ b/Assets/Editor/Minigames.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d8af6b4c7a999a4aa2180ec5422baf3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/Minigames/Airplane.meta b/Assets/Editor/Minigames/Airplane.meta new file mode 100644 index 00000000..338f36c9 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 259f822b327e0d740ae0542eb24e1d0a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/Minigames/Airplane/AirplaneSettingsEditor.cs b/Assets/Editor/Minigames/Airplane/AirplaneSettingsEditor.cs new file mode 100644 index 00000000..0ca88d31 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/AirplaneSettingsEditor.cs @@ -0,0 +1,96 @@ +using Minigames.Airplane.Data; +using Minigames.Airplane.Settings; +using UnityEditor; +using UnityEngine; + +namespace Editor.Minigames.Airplane +{ + /// + /// Custom editor for AirplaneSettings that conditionally shows default obstacle positioning fields. + /// Integrates with SettingsEditorWindow. + /// + [CustomEditor(typeof(AirplaneSettings))] + public class AirplaneSettingsEditor : UnityEditor.Editor + { + public override void OnInspectorGUI() + { + serializedObject.Update(); + + // Draw all properties except the default obstacle positioning section + SerializedProperty iterator = serializedObject.GetIterator(); + bool enterChildren = true; + + while (iterator.NextVisible(enterChildren)) + { + enterChildren = false; + + // Skip script field + if (iterator.propertyPath == "m_Script") + continue; + + // Handle Default Obstacle Positioning section specially + if (iterator.propertyPath == "defaultObstaclePositionMode") + { + DrawDefaultObstaclePositioningSection(); + + // Skip the related fields as we'll draw them conditionally + iterator.NextVisible(false); // Skip defaultObstacleRandomYMin + iterator.NextVisible(false); // Skip defaultObstacleRandomYMax + continue; + } + + EditorGUILayout.PropertyField(iterator, true); + } + + // Apply changes and mark dirty for SettingsEditorWindow integration + if (serializedObject.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(target); + } + } + + private void DrawDefaultObstaclePositioningSection() + { + var modeProperty = serializedObject.FindProperty("defaultObstaclePositionMode"); + var randomYMinProperty = serializedObject.FindProperty("defaultObstacleRandomYMin"); + var randomYMaxProperty = serializedObject.FindProperty("defaultObstacleRandomYMax"); + + EditorGUILayout.Space(); + EditorGUILayout.PropertyField(modeProperty, new GUIContent("Default Position Mode")); + + SpawnPositionMode currentMode = (SpawnPositionMode)modeProperty.enumValueIndex; + + EditorGUILayout.Space(5); + + switch (currentMode) + { + case SpawnPositionMode.SnapToGround: + EditorGUILayout.HelpBox("Obstacles will raycast to find ground and snap to it. If raycast fails, Fallback Y Position (configured in Ground Snapping section above) will be used.", MessageType.Info); + break; + + case SpawnPositionMode.SpecifiedY: + EditorGUILayout.HelpBox("Obstacles will spawn at Fallback Y Position (configured in Ground Snapping section above).", MessageType.Info); + break; + + case SpawnPositionMode.RandomRange: + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUILayout.LabelField("Random Y Range", EditorStyles.miniBoldLabel); + EditorGUILayout.PropertyField(randomYMinProperty, new GUIContent("Min Y")); + EditorGUILayout.PropertyField(randomYMaxProperty, new GUIContent("Max Y")); + + // Validation + if (randomYMinProperty.floatValue > randomYMaxProperty.floatValue) + { + EditorGUILayout.HelpBox("Min Y should be less than Max Y!", MessageType.Warning); + } + else + { + EditorGUILayout.HelpBox($"Obstacles will spawn at random Y between {randomYMinProperty.floatValue:F2} and {randomYMaxProperty.floatValue:F2}.", MessageType.Info); + } + EditorGUILayout.EndVertical(); + break; + } + } + } +} + diff --git a/Assets/Editor/Minigames/Airplane/AirplaneSettingsEditor.cs.meta b/Assets/Editor/Minigames/Airplane/AirplaneSettingsEditor.cs.meta new file mode 100644 index 00000000..af4b085b --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/AirplaneSettingsEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: aa9b104969324b8584672126a4277d37 +timeCreated: 1765990746 \ No newline at end of file diff --git a/Assets/Editor/Minigames/Airplane/BaseDistanceSpawnerEditor.cs b/Assets/Editor/Minigames/Airplane/BaseDistanceSpawnerEditor.cs new file mode 100644 index 00000000..80ba3a4c --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/BaseDistanceSpawnerEditor.cs @@ -0,0 +1,128 @@ +using Minigames.Airplane.Core.Spawning; +using Minigames.Airplane.Data; +using UnityEditor; +using UnityEngine; + +namespace Editor.Minigames.Airplane +{ + /// + /// Custom editor for BaseDistanceSpawner that conditionally shows/hides spawn parameters + /// based on the selected SpawnPoolMode. + /// + [CustomEditor(typeof(BaseDistanceSpawner), true)] + public class BaseDistanceSpawnerEditor : UnityEditor.Editor + { + private SerializedProperty _poolModeProperty; + private SerializedProperty _poolsProperty; + private SerializedProperty _globalMinDistanceProperty; + private SerializedProperty _globalMaxDistanceProperty; + private SerializedProperty _recencyPenaltyProperty; + private SerializedProperty _groundLayerProperty; + private SerializedProperty _maxGroundRaycastProperty; + private SerializedProperty _defaultObjectYOffsetProperty; + private SerializedProperty _showDebugLogsProperty; + + protected virtual void OnEnable() + { + _poolModeProperty = serializedObject.FindProperty("poolMode"); + _poolsProperty = serializedObject.FindProperty("pools"); + _globalMinDistanceProperty = serializedObject.FindProperty("globalMinDistance"); + _globalMaxDistanceProperty = serializedObject.FindProperty("globalMaxDistance"); + _recencyPenaltyProperty = serializedObject.FindProperty("recencyPenaltyDuration"); + _groundLayerProperty = serializedObject.FindProperty("groundLayer"); + _maxGroundRaycastProperty = serializedObject.FindProperty("maxGroundRaycastDistance"); + _defaultObjectYOffsetProperty = serializedObject.FindProperty("defaultObjectYOffset"); + _showDebugLogsProperty = serializedObject.FindProperty("showDebugLogs"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.LabelField("Distance-Based Spawner", EditorStyles.boldLabel); + EditorGUILayout.HelpBox("Spawns objects at calculated X positions based on distance from plane. Containers are configured in AirplaneSpawnManager.", MessageType.Info); + EditorGUILayout.Space(); + + // Pool Configuration + EditorGUILayout.LabelField("Pool Configuration", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_poolModeProperty); + + SpawnPoolMode currentMode = (SpawnPoolMode)_poolModeProperty.enumValueIndex; + + // Show global parameters only in Together mode + if (currentMode == SpawnPoolMode.Together) + { + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Global Spawn Parameters", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_globalMinDistanceProperty); + EditorGUILayout.PropertyField(_globalMaxDistanceProperty); + + EditorGUILayout.HelpBox("Together Mode: All pools use global spawn distances. Per-pool overrides are ignored.", MessageType.Info); + } + else + { + EditorGUILayout.HelpBox("Exclusive Mode: Each pool spawns independently. Configure per-pool spawn distances below.", MessageType.Info); + } + + EditorGUILayout.Space(); + + // Pools array with custom display + EditorGUILayout.PropertyField(_poolsProperty, true); + + // Show per-pool parameter hints + if (_poolsProperty.isExpanded && _poolsProperty.arraySize > 0) + { + EditorGUI.indentLevel++; + for (int i = 0; i < _poolsProperty.arraySize; i++) + { + var poolProperty = _poolsProperty.GetArrayElementAtIndex(i); + var overrideMinProperty = poolProperty.FindPropertyRelative("overrideMinDistance"); + var overrideMaxProperty = poolProperty.FindPropertyRelative("overrideMaxDistance"); + + if (currentMode == SpawnPoolMode.Together) + { + // Grey out per-pool overrides in Together mode + if (overrideMinProperty.floatValue > 0 || overrideMaxProperty.floatValue > 0) + { + EditorGUILayout.HelpBox($"Pool {i}: Per-pool overrides ignored in Together mode", MessageType.Warning); + } + } + else + { + // Show active overrides in Exclusive mode + if (overrideMinProperty.floatValue <= 0 && overrideMaxProperty.floatValue <= 0) + { + EditorGUILayout.HelpBox($"Pool {i}: Using global distances (set overrides > 0 to customize)", MessageType.Info); + } + } + } + EditorGUI.indentLevel--; + } + + EditorGUILayout.Space(); + + // Object Positioning + EditorGUILayout.LabelField("Object Positioning", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_groundLayerProperty); + EditorGUILayout.PropertyField(_maxGroundRaycastProperty); + EditorGUILayout.PropertyField(_defaultObjectYOffsetProperty); + EditorGUILayout.HelpBox("Prefabs can use PrefabSpawnEntryComponent to specify Y positioning: SnapToGround, SpecifiedY, or RandomRange", MessageType.Info); + + EditorGUILayout.Space(); + + // Recency Tracking + EditorGUILayout.LabelField("Recency Tracking", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_recencyPenaltyProperty); + EditorGUILayout.HelpBox("Recently spawned prefabs receive lower weight for diversity", MessageType.Info); + + EditorGUILayout.Space(); + + // Debug + EditorGUILayout.LabelField("Debug", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_showDebugLogsProperty); + + serializedObject.ApplyModifiedProperties(); + } + } +} + diff --git a/Assets/Editor/Minigames/Airplane/BaseDistanceSpawnerEditor.cs.meta b/Assets/Editor/Minigames/Airplane/BaseDistanceSpawnerEditor.cs.meta new file mode 100644 index 00000000..af48b92a --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/BaseDistanceSpawnerEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 32aded175b00b8a4bae4a95861db8123 \ No newline at end of file diff --git a/Assets/Editor/Minigames/Airplane/GroundDistanceSpawnerEditor.cs b/Assets/Editor/Minigames/Airplane/GroundDistanceSpawnerEditor.cs new file mode 100644 index 00000000..07fa86ae --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/GroundDistanceSpawnerEditor.cs @@ -0,0 +1,63 @@ +using Minigames.Airplane.Core.Spawning; +using UnityEditor; +using UnityEngine; + +namespace Editor.Minigames.Airplane +{ + /// + /// Simplified custom editor for GroundDistanceSpawner. + /// Shows only ground-relevant fields. Ground Y and interval are in AirplaneSettings. + /// + [CustomEditor(typeof(GroundDistanceSpawner))] + public class GroundDistanceSpawnerEditor : UnityEditor.Editor + { + private SerializedProperty _poolsProperty; + + private void OnEnable() + { + _poolsProperty = serializedObject.FindProperty("pools"); + + // Ensure exactly 1 pool exists + if (_poolsProperty.arraySize != 1) + { + _poolsProperty.arraySize = 1; + serializedObject.ApplyModifiedProperties(); + } + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + // Ensure exactly 1 pool + if (_poolsProperty.arraySize != 1) + { + _poolsProperty.arraySize = 1; + } + + // Draw single pool + EditorGUILayout.LabelField("Ground Tiles (Fixed: 1 pool)", EditorStyles.boldLabel); + + var poolElement = _poolsProperty.GetArrayElementAtIndex(0); + var prefabsProperty = poolElement.FindPropertyRelative("prefabs"); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + EditorGUILayout.PropertyField(prefabsProperty, new GUIContent("Prefabs"), true); + + if (prefabsProperty.arraySize == 0) + { + EditorGUILayout.HelpBox("Add at least one ground tile prefab", MessageType.Warning); + } + else + { + EditorGUILayout.LabelField($"Prefabs: {prefabsProperty.arraySize}", EditorStyles.miniLabel); + } + + EditorGUILayout.EndVertical(); + + serializedObject.ApplyModifiedProperties(); + } + } +} + diff --git a/Assets/Editor/Minigames/Airplane/GroundDistanceSpawnerEditor.cs.meta b/Assets/Editor/Minigames/Airplane/GroundDistanceSpawnerEditor.cs.meta new file mode 100644 index 00000000..d71a66f4 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/GroundDistanceSpawnerEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 31225636ea0743fdbfe13fbb0c5f46af +timeCreated: 1765987013 \ No newline at end of file diff --git a/Assets/Editor/Minigames/Airplane/ObstacleDistanceSpawnerEditor.cs b/Assets/Editor/Minigames/Airplane/ObstacleDistanceSpawnerEditor.cs new file mode 100644 index 00000000..117f1375 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/ObstacleDistanceSpawnerEditor.cs @@ -0,0 +1,145 @@ +using Minigames.Airplane.Core.Spawning; +using Minigames.Airplane.Data; +using UnityEditor; +using UnityEngine; + +namespace Editor.Minigames.Airplane +{ + /// + /// Custom editor for ObstacleDistanceSpawner. + /// Enforces exactly 2 pools (Positive/Negative) with custom labels. + /// All spawn parameters configured in AirplaneSettings. + /// + [CustomEditor(typeof(ObstacleDistanceSpawner))] + public class ObstacleDistanceSpawnerEditor : UnityEditor.Editor + { + private SerializedProperty _poolModeProperty; + private SerializedProperty _poolsProperty; + + private readonly string[] _poolNames = { "Positive Obstacles", "Negative Obstacles" }; + private readonly string[] _poolDescriptions = + { + "Obstacles that benefit the player", + "Obstacles that hinder the player" + }; + + private bool[] _poolFoldouts = new bool[2]; + + private void OnEnable() + { + _poolModeProperty = serializedObject.FindProperty("poolMode"); + _poolsProperty = serializedObject.FindProperty("pools"); + + // Ensure exactly 2 pools exist + EnsureTwoPools(); + } + + private void EnsureTwoPools() + { + if (_poolsProperty != null && _poolsProperty.arraySize != 2) + { + _poolsProperty.arraySize = 2; + + // Initialize pool descriptions + for (int i = 0; i < 2; i++) + { + var poolElement = _poolsProperty.GetArrayElementAtIndex(i); + var descProperty = poolElement.FindPropertyRelative("description"); + if (descProperty != null && string.IsNullOrEmpty(descProperty.stringValue)) + { + descProperty.stringValue = _poolNames[i]; + } + } + + serializedObject.ApplyModifiedProperties(); + } + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.HelpBox("Note: Positive/Negative ratio, unlock times, spawn distances, recency tracking, positioning, and debug settings are configured globally in AirplaneSettings. Containers are configured in AirplaneSpawnManager.", MessageType.Info); + EditorGUILayout.Space(); + + if (_poolModeProperty != null) + { + EditorGUILayout.PropertyField(_poolModeProperty); + + SpawnPoolMode currentMode = (SpawnPoolMode)_poolModeProperty.enumValueIndex; + + if (currentMode == SpawnPoolMode.Together) + { + EditorGUILayout.HelpBox("Together Mode: Both pools share a single spawn stream using global distances from settings.", MessageType.Info); + } + else + { + EditorGUILayout.HelpBox("Exclusive Mode: Each pool spawns independently. Use per-pool overrides or global distances from settings.", MessageType.Info); + } + } + + EditorGUILayout.Space(); + + // Obstacle Pools (exactly 2, custom display) + EditorGUILayout.LabelField("Obstacle Pools (Fixed: 2 pools)", EditorStyles.boldLabel); + + EnsureTwoPools(); + + if (_poolsProperty != null && _poolsProperty.arraySize == 2) + { + for (int i = 0; i < 2; i++) + { + var poolElement = _poolsProperty.GetArrayElementAtIndex(i); + var prefabsProperty = poolElement.FindPropertyRelative("prefabs"); + var descriptionProperty = poolElement.FindPropertyRelative("description"); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + // Foldout with custom label + _poolFoldouts[i] = EditorGUILayout.Foldout(_poolFoldouts[i], $"{_poolNames[i]} (Pool {i})", true, EditorStyles.foldoutHeader); + + if (_poolFoldouts[i]) + { + EditorGUI.indentLevel++; + + EditorGUILayout.LabelField(_poolDescriptions[i], EditorStyles.miniLabel); + EditorGUILayout.Space(5); + + if (prefabsProperty != null) + { + EditorGUILayout.PropertyField(prefabsProperty, new GUIContent("Prefabs"), true); + } + + if (descriptionProperty != null) + { + EditorGUILayout.PropertyField(descriptionProperty, new GUIContent("Description")); + } + + // Show info about prefab count + if (prefabsProperty != null) + { + if (prefabsProperty.arraySize == 0) + { + EditorGUILayout.HelpBox("Add prefabs for this pool", MessageType.Warning); + } + else + { + EditorGUILayout.LabelField($"Prefabs: {prefabsProperty.arraySize}", EditorStyles.miniLabel); + } + } + + EditorGUI.indentLevel--; + } + + EditorGUILayout.EndVertical(); + EditorGUILayout.Space(5); + } + } + + EditorGUILayout.Space(); + EditorGUILayout.HelpBox("Note: Positive/Negative ratio, unlock times, spawn distances, recency tracking, positioning, and debug settings are configured globally in AirplaneSettings. Containers are configured in AirplaneSpawnManager.", MessageType.Info); + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/Assets/Editor/Minigames/Airplane/ObstacleDistanceSpawnerEditor.cs.meta b/Assets/Editor/Minigames/Airplane/ObstacleDistanceSpawnerEditor.cs.meta new file mode 100644 index 00000000..db89de99 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/ObstacleDistanceSpawnerEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5d7f009b2123488381edd87bfb3ab2e8 +timeCreated: 1765985361 \ No newline at end of file diff --git a/Assets/Editor/Minigames/Airplane/ParallaxBackgroundSpawnerEditor.cs b/Assets/Editor/Minigames/Airplane/ParallaxBackgroundSpawnerEditor.cs new file mode 100644 index 00000000..79427250 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/ParallaxBackgroundSpawnerEditor.cs @@ -0,0 +1,190 @@ +using Minigames.Airplane.Core.Spawning; +using Minigames.Airplane.Data; +using UnityEditor; +using UnityEngine; + +namespace Editor.Minigames.Airplane +{ + /// + /// Custom editor for ParallaxBackgroundSpawner. + /// Enforces exactly 3 pools with custom labels (Background/Middle/Foreground). + /// Prevents array manipulation and provides clean, designer-friendly interface. + /// + [CustomEditor(typeof(ParallaxBackgroundSpawner))] + public class ParallaxBackgroundSpawnerEditor : UnityEditor.Editor + { + private SerializedProperty _poolsProperty; + private SerializedProperty _parallaxSortLayerProperty; + private SerializedProperty _backgroundSortOrderProperty; + private SerializedProperty _sortOrderIncrementProperty; + private SerializedProperty _globalStrengthProperty; + private SerializedProperty _backgroundSpeedProperty; + private SerializedProperty _middleSpeedProperty; + private SerializedProperty _foregroundSpeedProperty; + private SerializedProperty _cameraManagerProperty; + private SerializedProperty _showDebugLogsProperty; + + private readonly string[] _layerNames = { "Background Layer", "Middle Layer", "Foreground Layer" }; + private readonly string[] _layerDescriptions = + { + "Slowest parallax - furthest back", + "Medium parallax - middle depth", + "Fastest parallax - closest to camera" + }; + + private bool[] _poolFoldouts = new bool[3]; + + private void OnEnable() + { + _poolsProperty = serializedObject.FindProperty("pools"); + _parallaxSortLayerProperty = serializedObject.FindProperty("parallaxSortLayer"); + _backgroundSortOrderProperty = serializedObject.FindProperty("backgroundSortOrder"); + _sortOrderIncrementProperty = serializedObject.FindProperty("sortOrderIncrement"); + _globalStrengthProperty = serializedObject.FindProperty("globalStrength"); + _backgroundSpeedProperty = serializedObject.FindProperty("backgroundSpeed"); + _middleSpeedProperty = serializedObject.FindProperty("middleSpeed"); + _foregroundSpeedProperty = serializedObject.FindProperty("foregroundSpeed"); + _cameraManagerProperty = serializedObject.FindProperty("cameraManager"); + _showDebugLogsProperty = serializedObject.FindProperty("showDebugLogs"); + + // Ensure exactly 3 pools exist + EnsureThreePools(); + } + + private void EnsureThreePools() + { + if (_poolsProperty.arraySize != 3) + { + _poolsProperty.arraySize = 3; + + // Initialize pool descriptions + for (int i = 0; i < 3; i++) + { + var poolElement = _poolsProperty.GetArrayElementAtIndex(i); + var descProperty = poolElement.FindPropertyRelative("description"); + if (string.IsNullOrEmpty(descProperty.stringValue)) + { + descProperty.stringValue = _layerNames[i]; + } + } + + serializedObject.ApplyModifiedProperties(); + } + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + EditorGUILayout.HelpBox("Note: Spawn distances, recency tracking, and debug settings are configured globally in AirplaneSettings. Containers are configured in AirplaneSpawnManager.", MessageType.Info); + EditorGUILayout.Space(); + + // Camera Integration + EditorGUILayout.PropertyField(_cameraManagerProperty); + EditorGUILayout.Space(); + + // Parallax Configuration (CENTRALIZED SETTINGS) + EditorGUILayout.LabelField("Parallax Configuration", EditorStyles.boldLabel); + EditorGUILayout.HelpBox("These settings apply to ALL parallax elements spawned by this spawner. Adjust speeds to control depth perception.", MessageType.Info); + + EditorGUILayout.PropertyField(_globalStrengthProperty, new GUIContent("Global Strength", "Overall parallax intensity (0 = no effect, 1 = full)")); + EditorGUILayout.Space(5); + + EditorGUILayout.LabelField("Per-Layer Speeds", EditorStyles.miniBoldLabel); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(_backgroundSpeedProperty, new GUIContent("Background Speed", "Slowest layer, appears furthest (e.g., 0.3)")); + EditorGUILayout.PropertyField(_middleSpeedProperty, new GUIContent("Middle Speed", "Medium speed layer (e.g., 0.6)")); + EditorGUILayout.PropertyField(_foregroundSpeedProperty, new GUIContent("Foreground Speed", "Fastest layer, appears closest (e.g., 0.9)")); + EditorGUI.indentLevel--; + + // Validation warnings + if (_backgroundSpeedProperty.floatValue >= _middleSpeedProperty.floatValue) + { + EditorGUILayout.HelpBox("Warning: Background speed should be less than Middle speed for proper depth effect", MessageType.Warning); + } + if (_middleSpeedProperty.floatValue >= _foregroundSpeedProperty.floatValue) + { + EditorGUILayout.HelpBox("Warning: Middle speed should be less than Foreground speed for proper depth effect", MessageType.Warning); + } + + EditorGUILayout.Space(); + + // Sort Configuration + EditorGUILayout.LabelField("Sort Configuration", EditorStyles.boldLabel); + EditorGUILayout.HelpBox("All parallax objects use the same sort layer with different sort orders for depth.", MessageType.Info); + EditorGUILayout.PropertyField(_parallaxSortLayerProperty, new GUIContent("Sort Layer", "Sort layer for all parallax elements (typically 'Background')")); + EditorGUILayout.PropertyField(_backgroundSortOrderProperty, new GUIContent("Background Sort Order", "Sort order for furthest back layer (e.g., -50)")); + EditorGUILayout.PropertyField(_sortOrderIncrementProperty, new GUIContent("Sort Order Increment", "Increment between layers (e.g., 10 → Middle: -40, Foreground: -30)")); + + // Show calculated sort orders + int middleOrder = _backgroundSortOrderProperty.intValue + _sortOrderIncrementProperty.intValue; + int foregroundOrder = _backgroundSortOrderProperty.intValue + (_sortOrderIncrementProperty.intValue * 2); + EditorGUILayout.LabelField($"Calculated: Background={_backgroundSortOrderProperty.intValue}, Middle={middleOrder}, Foreground={foregroundOrder}", EditorStyles.miniLabel); + + EditorGUILayout.Space(); + + // Pool Mode (locked to Exclusive) + EditorGUILayout.LabelField("Spawn Mode", EditorStyles.boldLabel); + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.TextField("Pool Mode", "Exclusive (Fixed)"); + EditorGUI.EndDisabledGroup(); + EditorGUILayout.HelpBox("Parallax spawner always uses Exclusive mode - each layer spawns independently", MessageType.Info); + EditorGUILayout.Space(); + + // Parallax Layers (exactly 3, custom display) + EditorGUILayout.LabelField("Parallax Layers (Fixed: 3 layers)", EditorStyles.boldLabel); + + EnsureThreePools(); // Safety check + + for (int i = 0; i < 3; i++) + { + var poolElement = _poolsProperty.GetArrayElementAtIndex(i); + var prefabsProperty = poolElement.FindPropertyRelative("prefabs"); + var descProperty = poolElement.FindPropertyRelative("description"); + var overrideMinDistProperty = poolElement.FindPropertyRelative("overrideMinDistance"); + var overrideMaxDistProperty = poolElement.FindPropertyRelative("overrideMaxDistance"); + + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + + // Foldout with custom label + _poolFoldouts[i] = EditorGUILayout.Foldout(_poolFoldouts[i], $"{_layerNames[i]} (Pool {i})", true, EditorStyles.foldoutHeader); + + if (_poolFoldouts[i]) + { + EditorGUI.indentLevel++; + + EditorGUILayout.LabelField(_layerDescriptions[i], EditorStyles.miniLabel); + EditorGUILayout.Space(5); + + EditorGUILayout.PropertyField(descProperty, new GUIContent("Description")); + EditorGUILayout.PropertyField(prefabsProperty, new GUIContent("Prefabs"), true); + + EditorGUILayout.Space(5); + EditorGUILayout.LabelField("Spawn Distance Overrides", EditorStyles.miniBoldLabel); + EditorGUILayout.HelpBox("Leave at 0 to use global settings. Set > 0 to override for this layer.", MessageType.Info); + EditorGUILayout.PropertyField(overrideMinDistProperty, new GUIContent("Min Distance Override", "Minimum distance between objects (0 = use global)")); + EditorGUILayout.PropertyField(overrideMaxDistProperty, new GUIContent("Max Distance Override", "Maximum distance between objects (0 = use global)")); + + // Show info about prefab count + if (prefabsProperty.arraySize == 0) + { + EditorGUILayout.HelpBox("Add prefabs for this layer", MessageType.Warning); + } + else + { + EditorGUILayout.LabelField($"Prefabs: {prefabsProperty.arraySize}", EditorStyles.miniLabel); + } + + EditorGUI.indentLevel--; + } + + EditorGUILayout.EndVertical(); + EditorGUILayout.Space(5); + } + + EditorGUILayout.Space(); + + serializedObject.ApplyModifiedProperties(); + } + } +} + diff --git a/Assets/Editor/Minigames/Airplane/ParallaxBackgroundSpawnerEditor.cs.meta b/Assets/Editor/Minigames/Airplane/ParallaxBackgroundSpawnerEditor.cs.meta new file mode 100644 index 00000000..5b5bb725 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/ParallaxBackgroundSpawnerEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 41d4944f4ed9436f84384fb2361f6e0c +timeCreated: 1765972253 \ No newline at end of file diff --git a/Assets/Editor/Minigames/Airplane/PrefabSpawnEntryComponentEditor.cs b/Assets/Editor/Minigames/Airplane/PrefabSpawnEntryComponentEditor.cs new file mode 100644 index 00000000..9a6aa9a1 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/PrefabSpawnEntryComponentEditor.cs @@ -0,0 +1,75 @@ +using Minigames.Airplane.Data; +using UnityEditor; +using UnityEngine; + +namespace Editor.Minigames.Airplane +{ + /// + /// Custom editor for PrefabSpawnEntryComponent that conditionally shows fields based on spawn mode. + /// + [CustomEditor(typeof(PrefabSpawnEntryComponent))] + public class PrefabSpawnEntryComponentEditor : UnityEditor.Editor + { + private SerializedProperty _spawnPositionModeProperty; + private SerializedProperty _specifiedYProperty; + private SerializedProperty _randomYMinProperty; + private SerializedProperty _randomYMaxProperty; + + private void OnEnable() + { + _spawnPositionModeProperty = serializedObject.FindProperty("spawnPositionMode"); + _specifiedYProperty = serializedObject.FindProperty("specifiedY"); + _randomYMinProperty = serializedObject.FindProperty("randomYMin"); + _randomYMaxProperty = serializedObject.FindProperty("randomYMax"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.LabelField("Prefab Spawn Positioning", EditorStyles.boldLabel); + EditorGUILayout.HelpBox("Controls how this prefab is positioned vertically when spawned. If this component is missing, spawner uses default settings from AirplaneSettings.", MessageType.Info); + EditorGUILayout.Space(); + + // Always show the mode selector + EditorGUILayout.PropertyField(_spawnPositionModeProperty, new GUIContent("Spawn Position Mode")); + + SpawnPositionMode currentMode = (SpawnPositionMode)_spawnPositionModeProperty.enumValueIndex; + + EditorGUILayout.Space(); + + // Show mode-specific fields + switch (currentMode) + { + case SpawnPositionMode.SnapToGround: + EditorGUILayout.HelpBox("Object will raycast down to find ground and snap its bottom to the surface. If no ground is found, fallback Y position from settings will be used.", MessageType.Info); + break; + + case SpawnPositionMode.SpecifiedY: + EditorGUILayout.LabelField("Fixed Y Position", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_specifiedYProperty, new GUIContent("Y Position")); + EditorGUILayout.HelpBox("Object will spawn at this exact Y coordinate.", MessageType.Info); + break; + + case SpawnPositionMode.RandomRange: + EditorGUILayout.LabelField("Random Y Range", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(_randomYMinProperty, new GUIContent("Min Y")); + EditorGUILayout.PropertyField(_randomYMaxProperty, new GUIContent("Max Y")); + + // Validation + if (_randomYMinProperty.floatValue > _randomYMaxProperty.floatValue) + { + EditorGUILayout.HelpBox("Min Y should be less than Max Y!", MessageType.Warning); + } + else + { + EditorGUILayout.HelpBox($"Object will spawn at random Y between {_randomYMinProperty.floatValue:F2} and {_randomYMaxProperty.floatValue:F2}.", MessageType.Info); + } + break; + } + + serializedObject.ApplyModifiedProperties(); + } + } +} + diff --git a/Assets/Editor/Minigames/Airplane/PrefabSpawnEntryComponentEditor.cs.meta b/Assets/Editor/Minigames/Airplane/PrefabSpawnEntryComponentEditor.cs.meta new file mode 100644 index 00000000..7569e669 --- /dev/null +++ b/Assets/Editor/Minigames/Airplane/PrefabSpawnEntryComponentEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0eccbe64a21c4c07a09b2df66faf43b1 +timeCreated: 1765990535 \ No newline at end of file diff --git a/Assets/Editor/Settings/SettingsEditorWindow.cs b/Assets/Editor/Settings/SettingsEditorWindow.cs index c2848f50..f2c3e283 100644 --- a/Assets/Editor/Settings/SettingsEditorWindow.cs +++ b/Assets/Editor/Settings/SettingsEditorWindow.cs @@ -181,28 +181,38 @@ namespace AppleHills.Core.Settings.Editor return; } - SerializedObject serializedObj = serializedSettingsObjects[typeof(T).Name]; - serializedObj.Update(); - EditorGUILayout.Space(10); - // Draw all properties - SerializedProperty property = serializedObj.GetIterator(); - bool enterChildren = true; - while (property.NextVisible(enterChildren)) + // Use CreateEditor to respect custom editors (like AirplaneSettingsEditor) + UnityEditor.Editor editor = UnityEditor.Editor.CreateEditor(settings); + if (editor != null) { - enterChildren = false; - - // Skip the script field - if (property.name == "m_Script") continue; - - EditorGUILayout.PropertyField(property, true); + editor.OnInspectorGUI(); + DestroyImmediate(editor); } - - // Apply changes - if (serializedObj.ApplyModifiedProperties()) + else { - EditorUtility.SetDirty(settings); + // Fallback to default drawing if no custom editor exists + SerializedObject serializedObj = serializedSettingsObjects[typeof(T).Name]; + serializedObj.Update(); + + SerializedProperty property = serializedObj.GetIterator(); + bool enterChildren = true; + while (property.NextVisible(enterChildren)) + { + enterChildren = false; + + // Skip the script field + if (property.name == "m_Script") continue; + + EditorGUILayout.PropertyField(property, true); + } + + // Apply changes + if (serializedObj.ApplyModifiedProperties()) + { + EditorUtility.SetDirty(settings); + } } } diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground.meta new file mode 100644 index 00000000..faa7db21 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9f8ef922594273a44b7a93d1112de475 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background.meta new file mode 100644 index 00000000..95fc356a --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b15db506b2816c7448d98bfad536322e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 1.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 1.prefab new file mode 100644 index 00000000..978c1320 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 1.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5151173141545254425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5809503828362050416} + - component: {fileID: 626320663203422954} + - component: {fileID: -2730228252373635613} + m_Layer: 0 + m_Name: Cloud 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5809503828362050416 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4.996948, y: 4.996948, z: 4.996948} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &626320663203422954 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2531649364063002299, guid: 47c77f51628506e43a3a29e93e2ef24b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.72, y: 2.54} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-2730228252373635613 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 2 + specifiedY: 0 + randomYMin: 15 + randomYMax: 50 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 1.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 1.prefab.meta new file mode 100644 index 00000000..029391c9 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d9c2ddaa5d7acfa41b1ed92a1564560f +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 2.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 2.prefab new file mode 100644 index 00000000..1d36cb32 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 2.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5151173141545254425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5809503828362050416} + - component: {fileID: 626320663203422954} + - component: {fileID: 6763092502780334856} + m_Layer: 0 + m_Name: Cloud 2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5809503828362050416 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 9.7, y: 9.7, z: 9.7} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &626320663203422954 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2531649364063002299, guid: 47c77f51628506e43a3a29e93e2ef24b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.72, y: 2.54} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &6763092502780334856 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 2 + specifiedY: 0 + randomYMin: 5 + randomYMax: 25 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 2.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 2.prefab.meta new file mode 100644 index 00000000..4e532f7e --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 2.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 04a5ea4c8c227d04e9d66c5bd183f127 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 3.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 3.prefab new file mode 100644 index 00000000..774c9a00 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 3.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5151173141545254425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5809503828362050416} + - component: {fileID: 626320663203422954} + - component: {fileID: 3821761156441349722} + m_Layer: 0 + m_Name: Cloud 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5809503828362050416 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 8.45308, y: 8.45308, z: 8.45308} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &626320663203422954 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 1508337238920719353, guid: 03a5936ba20198b48a228a1cb0ccf1e0, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.72, y: 2.54} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &3821761156441349722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 2 + specifiedY: 0 + randomYMin: 15 + randomYMax: 50 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 3.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 3.prefab.meta new file mode 100644 index 00000000..2917c4c3 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 3.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2d826ffbbf2b169419cbaf1b9fd5adf9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 4.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 4.prefab new file mode 100644 index 00000000..629f91c8 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 4.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5151173141545254425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5809503828362050416} + - component: {fileID: 626320663203422954} + - component: {fileID: -5117962126752931833} + m_Layer: 0 + m_Name: Cloud 4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5809503828362050416 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 4.996948, y: 4.996948, z: 4.996948} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &626320663203422954 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 1508337238920719353, guid: 03a5936ba20198b48a228a1cb0ccf1e0, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.72, y: 2.54} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-5117962126752931833 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 2 + specifiedY: 0 + randomYMin: 15 + randomYMax: 50 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 4.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 4.prefab.meta new file mode 100644 index 00000000..8fe21254 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 4.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 553fdd7acf88ffc4b9d300906b9d5084 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 5.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 5.prefab new file mode 100644 index 00000000..2eef3b9a --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 5.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5151173141545254425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5809503828362050416} + - component: {fileID: 626320663203422954} + - component: {fileID: -5037727648253162311} + m_Layer: 0 + m_Name: Cloud 5 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5809503828362050416 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 9.7, y: 9.7, z: 9.7} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &626320663203422954 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 1508337238920719353, guid: 03a5936ba20198b48a228a1cb0ccf1e0, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.72, y: 2.54} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-5037727648253162311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 2 + specifiedY: 0 + randomYMin: 15 + randomYMax: 60 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 5.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 5.prefab.meta new file mode 100644 index 00000000..5e963f89 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud 5.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 41b5f43daaa530644b39097f4ec95104 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud.prefab new file mode 100644 index 00000000..aaa4c087 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5151173141545254425 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5809503828362050416} + - component: {fileID: 626320663203422954} + - component: {fileID: 7517701677496128920} + m_Layer: 0 + m_Name: Cloud + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5809503828362050416 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 6.2591, y: 6.2591, z: 6.2591} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &626320663203422954 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2531649364063002299, guid: 47c77f51628506e43a3a29e93e2ef24b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 3.72, y: 2.54} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &7517701677496128920 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5151173141545254425} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 2 + specifiedY: 0 + randomYMin: 15 + randomYMax: 50 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud.prefab.meta new file mode 100644 index 00000000..0f25e568 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Background/Cloud.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b0d1bfa4dea596a43b14726844143958 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground.meta new file mode 100644 index 00000000..30bbde9a --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba35834c4106144459943b40221165c3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes.prefab new file mode 100644 index 00000000..562a12cb --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes.prefab @@ -0,0 +1,326 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &284565137270423803 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1830647074121286980} + - component: {fileID: 445482946354992455} + m_Layer: 0 + m_Name: Bush (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1830647074121286980 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 284565137270423803} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -22.245468, y: -9.540898, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &445482946354992455 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 284565137270423803} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &370961529972617166 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4099576798772798678} + - component: {fileID: 7969953414818218085} + m_Layer: 0 + m_Name: Bush (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4099576798772798678 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 370961529972617166} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -20.245468, y: -11.3408985, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &7969953414818218085 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 370961529972617166} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &2405005885826663060 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1539948012152911233} + - component: {fileID: -2960207077745281184} + m_Layer: 0 + m_Name: Bushes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1539948012152911233 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405005885826663060} + 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: 2189097924517629894} + - {fileID: 1830647074121286980} + - {fileID: 4099576798772798678} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-2960207077745281184 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405005885826663060} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 +--- !u!1 &9210638249040086883 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2189097924517629894} + - component: {fileID: 2361412318642041498} + m_Layer: 0 + m_Name: Bush + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2189097924517629894 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9210638249040086883} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -26.445469, y: -11.240898, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &2361412318642041498 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9210638249040086883} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes.prefab.meta new file mode 100644 index 00000000..b220dc88 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 745fab545f64b0642b978cd5ba65e51d +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes2.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes2.prefab new file mode 100644 index 00000000..df6c2905 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes2.prefab @@ -0,0 +1,510 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &284565137270423803 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1830647074121286980} + - component: {fileID: 445482946354992455} + m_Layer: 0 + m_Name: Bush (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1830647074121286980 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 284565137270423803} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -22.245468, y: -9.540898, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &445482946354992455 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 284565137270423803} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &370961529972617166 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4099576798772798678} + - component: {fileID: 7969953414818218085} + m_Layer: 0 + m_Name: Bush (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4099576798772798678 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 370961529972617166} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -20.245468, y: -11.3408985, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &7969953414818218085 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 370961529972617166} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &2405005885826663060 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1539948012152911233} + - component: {fileID: 2222220414209176757} + m_Layer: 0 + m_Name: Bushes2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1539948012152911233 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405005885826663060} + 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: 2189097924517629894} + - {fileID: 1830647074121286980} + - {fileID: 4099576798772798678} + - {fileID: 3992879680070418879} + - {fileID: 495869288432280242} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2222220414209176757 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405005885826663060} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 +--- !u!1 &5441559675654747664 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 495869288432280242} + - component: {fileID: 8180821467402598608} + m_Layer: 0 + m_Name: Bush (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &495869288432280242 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5441559675654747664} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -15.89, y: -11.29, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &8180821467402598608 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5441559675654747664} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &8530614714647020621 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3992879680070418879} + - component: {fileID: 1286937362088428332} + m_Layer: 0 + m_Name: Bush (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3992879680070418879 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8530614714647020621} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -18.04, y: -9.35, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1286937362088428332 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8530614714647020621} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &9210638249040086883 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2189097924517629894} + - component: {fileID: 2361412318642041498} + m_Layer: 0 + m_Name: Bush + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2189097924517629894 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9210638249040086883} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -26.445469, y: -11.240898, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &2361412318642041498 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9210638249040086883} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes2.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes2.prefab.meta new file mode 100644 index 00000000..58d25021 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes2.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2b45d26d0e98cce4c82fc7414805edfa +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes3.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes3.prefab new file mode 100644 index 00000000..50bffc1c --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes3.prefab @@ -0,0 +1,234 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &370961529972617166 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4099576798772798678} + - component: {fileID: 7969953414818218085} + m_Layer: 0 + m_Name: Bush (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4099576798772798678 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 370961529972617166} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -23.43, y: -11.04, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &7969953414818218085 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 370961529972617166} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &2405005885826663060 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1539948012152911233} + - component: {fileID: -5062964641679850418} + m_Layer: 0 + m_Name: Bushes3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1539948012152911233 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405005885826663060} + 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: 2189097924517629894} + - {fileID: 4099576798772798678} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-5062964641679850418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2405005885826663060} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 +--- !u!1 &9210638249040086883 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2189097924517629894} + - component: {fileID: 2361412318642041498} + m_Layer: 0 + m_Name: Bush + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2189097924517629894 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9210638249040086883} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -26.445469, y: -11.240898, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1539948012152911233} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &2361412318642041498 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9210638249040086883} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes3.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes3.prefab.meta new file mode 100644 index 00000000..d0902704 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Bushes3.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 63558e5ef317da348a0dc24bade05b93 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Tree1.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Tree1.prefab new file mode 100644 index 00000000..f6615311 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Tree1.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6834004734717855054 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6820121061384395020} + - component: {fileID: 6976441968461556768} + - component: {fileID: -9154724994619676525} + m_Layer: 0 + m_Name: Tree1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6820121061384395020 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6834004734717855054} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -13.9, y: 2.4000015, 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!212 &6976441968461556768 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6834004734717855054} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-9154724994619676525 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6834004734717855054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Tree1.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Tree1.prefab.meta new file mode 100644 index 00000000..6414755c --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/Tree1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 56c7f78165748d14e904ce970995ed85 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/TreeGroup.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/TreeGroup.prefab new file mode 100644 index 00000000..33149153 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/TreeGroup.prefab @@ -0,0 +1,326 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2439114276580390837 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1088912832036917763} + - component: {fileID: -7717229810774754135} + m_Layer: 0 + m_Name: TreeGroup + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1088912832036917763 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2439114276580390837} + 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: 2596113292205067521} + - {fileID: 30883490510243952} + - {fileID: 6638832021173743968} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &-7717229810774754135 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2439114276580390837} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 +--- !u!1 &8199323135941985458 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6638832021173743968} + - component: {fileID: 2755619005994430403} + m_Layer: 0 + m_Name: Bush (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6638832021173743968 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8199323135941985458} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -22.15, y: -28, z: 0} + m_LocalScale: {x: 1.3889, y: 1.3889, z: 1.3889} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1088912832036917763} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &2755619005994430403 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8199323135941985458} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &8706323806710955201 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 30883490510243952} + - component: {fileID: 1864549540372884580} + m_Layer: 0 + m_Name: Bush (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &30883490510243952 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8706323806710955201} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -24.4, y: -28.63, z: 0} + m_LocalScale: {x: 0.6818, y: 0.6818, z: 0.6818} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1088912832036917763} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1864549540372884580 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8706323806710955201} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!1 &8796582261114010077 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2596113292205067521} + - component: {fileID: 3863657134121262542} + m_Layer: 0 + m_Name: Bush (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2596113292205067521 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8796582261114010077} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -27.034805, y: -28.21682, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1088912832036917763} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &3863657134121262542 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8796582261114010077} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 622133659 + m_SortingLayer: -1 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 8.15, y: 4.61} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/TreeGroup.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/TreeGroup.prefab.meta new file mode 100644 index 00000000..b9aa66df --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Foreground/TreeGroup.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7e8f54df4c74f8f4a877d5729286fe5a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle.meta new file mode 100644 index 00000000..3bafbe4d --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6623faf0bcf7d84468969d2c3e481d3f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 1.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 1.prefab new file mode 100644 index 00000000..6b158e66 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 1.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3707466564348580456 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6489938372873184282} + - component: {fileID: 1053150720430733673} + - component: {fileID: -6201028178928489780} + m_Layer: 0 + m_Name: House 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6489938372873184282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.5294914, y: 1.5294914, z: 1.5294914} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1053150720430733673 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 5452591694125666932, guid: 1068ec3c76101e24a9c550d96c3b7b83, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 7.65, y: 6.075} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-6201028178928489780 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 1.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 1.prefab.meta new file mode 100644 index 00000000..8a9fd8dc --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 96866019d4dc15f4387ddad1333634ab +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 2.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 2.prefab new file mode 100644 index 00000000..4c4016cf --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 2.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3707466564348580456 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6489938372873184282} + - component: {fileID: 1053150720430733673} + - component: {fileID: -1118722040340468723} + m_Layer: 0 + m_Name: House 2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6489938372873184282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.9999999, y: 1.9999999, z: 1.9999999} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1053150720430733673 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 7763308037186749932, guid: b8a806194d0b40e41b62652a3fc25f7b, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 7.65, y: 6.075} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-1118722040340468723 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 2.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 2.prefab.meta new file mode 100644 index 00000000..f36afca5 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 2.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a27a76cd67e25fe4fbeea326f594ec2c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 3.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 3.prefab new file mode 100644 index 00000000..2a5ec400 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 3.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3707466564348580456 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6489938372873184282} + - component: {fileID: 1053150720430733673} + - component: {fileID: 263283298343971857} + m_Layer: 0 + m_Name: House 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6489938372873184282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + 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: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1053150720430733673 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: 499587934724417843, guid: 04edac8af91d23b4c84ebcf08a41babe, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 7.65, y: 6.075} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &263283298343971857 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 3.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 3.prefab.meta new file mode 100644 index 00000000..1e436c3d --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 3.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d4dc2ca39d101a446a6ca7afe8acdfcf +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 4.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 4.prefab new file mode 100644 index 00000000..d1f74658 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 4.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3707466564348580456 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6489938372873184282} + - component: {fileID: 1053150720430733673} + - component: {fileID: 22540477391130674} + m_Layer: 0 + m_Name: House 4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6489938372873184282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 5, y: 5, z: 5} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1053150720430733673 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -5797346409433087690, guid: 13a7f268cf2517a43902d1f0ff66a20d, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 7.65, y: 6.075} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &22540477391130674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 4.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 4.prefab.meta new file mode 100644 index 00000000..7cb1143b --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House 4.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d87cc6288dbb4464582a0c96dfca4607 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House.prefab b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House.prefab new file mode 100644 index 00000000..9fd41bf5 --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House.prefab @@ -0,0 +1,110 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3707466564348580456 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6489938372873184282} + - component: {fileID: 1053150720430733673} + - component: {fileID: -6186227627049432776} + m_Layer: 0 + m_Name: House + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6489938372873184282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 2} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1053150720430733673 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -2764832460221319265, guid: 1068ec3c76101e24a9c550d96c3b7b83, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 7.65, y: 6.075} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!114 &-6186227627049432776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3707466564348580456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House.prefab.meta b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House.prefab.meta new file mode 100644 index 00000000..ed34221e --- /dev/null +++ b/Assets/Prefabs/Minigames/Airplane/ParalaxBackground/Middle/House.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1b55130d1450b0741961df1fc7337f29 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/AirplaneWindZone.prefab b/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/AirplaneWindZone.prefab index 4620cd8b..70d10cda 100644 --- a/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/AirplaneWindZone.prefab +++ b/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/AirplaneWindZone.prefab @@ -11,6 +11,7 @@ GameObject: - component: {fileID: 4572188480515029494} - component: {fileID: 6979039544463298865} - component: {fileID: 1989378388080844566} + - component: {fileID: 7567962733712432860} m_Layer: 0 m_Name: AirplaneWindZone m_TagString: Untagged @@ -96,6 +97,22 @@ MonoBehaviour: isWorldSpace: 1 windParticles: {fileID: 0} showDebugLogs: 0 +--- !u!114 &7567962733712432860 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 497267990420767357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 --- !u!1 &2715744416533832886 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/BouncySurface.prefab b/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/BouncySurface.prefab index aa8485e7..7fc004ed 100644 --- a/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/BouncySurface.prefab +++ b/Assets/Prefabs/Minigames/Airplane/PlaceholderSpawns/BouncySurface.prefab @@ -12,6 +12,7 @@ GameObject: - component: {fileID: 8126210844742366787} - component: {fileID: 7874709284498167353} - component: {fileID: 806255670199755721} + - component: {fileID: 6677313130545265604} m_Layer: 0 m_Name: BouncySurface m_TagString: Untagged @@ -160,3 +161,19 @@ SpriteRenderer: m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_SpriteSortPoint: 0 +--- !u!114 &6677313130545265604 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1917678391913987792} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 90239fb003214b4087d0717f6f417161, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Data.PrefabSpawnEntryComponent + spawnPositionMode: 0 + specifiedY: 0 + randomYMin: -5 + randomYMax: 5 diff --git a/Assets/Scenes/MiniGames/ValentineNoteDelivery.unity b/Assets/Scenes/MiniGames/ValentineNoteDelivery.unity index 3fa7828d..e1b5e0a0 100644 --- a/Assets/Scenes/MiniGames/ValentineNoteDelivery.unity +++ b/Assets/Scenes/MiniGames/ValentineNoteDelivery.unity @@ -579,12 +579,7 @@ MonoBehaviour: RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 FollowOffset: {x: 0, y: 0, z: -10} ---- !u!4 &340229587 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - m_PrefabInstance: {fileID: 453576884181909409} - m_PrefabAsset: {fileID: 0} ---- !u!1 &469774135 +--- !u!1 &377530944 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -592,89 +587,29 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 469774136} - - component: {fileID: 469774137} + - component: {fileID: 377530945} m_Layer: 0 - m_Name: Bush (4) + m_Name: SpawnedParalax m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &469774136 +--- !u!4 &377530945 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469774135} + m_GameObject: {fileID: 377530944} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.49999952, y: 2.1000013, z: 0} + 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: 1710395163} + m_Father: {fileID: 1784207402} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &469774137 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469774135} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &595230073 GameObject: m_ObjectHideFlags: 0 @@ -809,97 +744,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &695066654 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 695066655} - - component: {fileID: 695066656} - m_Layer: 0 - m_Name: Bush (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &695066655 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 695066654} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 20.1, y: -0.49999905, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &695066656 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 695066654} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &742382007 GameObject: m_ObjectHideFlags: 0 @@ -1335,7 +1179,7 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &815418543 +--- !u!1 &830587229 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1343,39 +1187,39 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 815418544} - - component: {fileID: 815418547} - - component: {fileID: 815418546} - - component: {fileID: 815418545} + - component: {fileID: 830587230} + - component: {fileID: 830587233} + - component: {fileID: 830587232} + - component: {fileID: 830587231} m_Layer: 14 - m_Name: Ground (2) + m_Name: Ground (9) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &815418544 +--- !u!4 &830587230 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 815418543} + m_GameObject: {fileID: 830587229} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -48.9, y: -5, z: 0} + m_LocalPosition: {x: -235.3, y: -5, z: 0} m_LocalScale: {x: 13.207894, y: 9.360231, z: 2.6263} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1701327424} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!61 &815418545 +--- !u!61 &830587231 BoxCollider2D: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 815418543} + m_GameObject: {fileID: 830587229} m_Enabled: 1 serializedVersion: 3 m_Density: 1 @@ -1415,14 +1259,14 @@ BoxCollider2D: m_AutoTiling: 0 m_Size: {x: 2.68, y: 1.07} m_EdgeRadius: 0 ---- !u!50 &815418546 +--- !u!50 &830587232 Rigidbody2D: serializedVersion: 5 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 815418543} + m_GameObject: {fileID: 830587229} m_BodyType: 2 m_Simulated: 1 m_UseFullKinematicContacts: 0 @@ -1442,14 +1286,14 @@ Rigidbody2D: m_SleepingMode: 1 m_CollisionDetection: 0 m_Constraints: 0 ---- !u!212 &815418547 +--- !u!212 &830587233 SpriteRenderer: serializedVersion: 2 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 815418543} + m_GameObject: {fileID: 830587229} m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 @@ -1890,97 +1734,6 @@ MonoBehaviour: shuffleDuration: 0.5 shuffleDistance: 2 showDebugLogs: 0 ---- !u!1 &1140411104 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1140411105} - - component: {fileID: 1140411106} - m_Layer: 0 - m_Name: Bush - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1140411105 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1140411104} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -30.9, y: 2.4000015, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1140411106 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1140411104} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &1145809176 GameObject: m_ObjectHideFlags: 0 @@ -2118,6 +1871,172 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1145809176} m_CullTransparentMesh: 1 +--- !u!1 &1196308194 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1196308195} + - component: {fileID: 1196308198} + - component: {fileID: 1196308197} + - component: {fileID: 1196308196} + m_Layer: 14 + m_Name: Ground (8) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1196308195 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1196308194} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -204.1, y: -5, z: 0} + m_LocalScale: {x: 13.207894, y: 9.360231, z: 2.6263} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1701327424} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &1196308196 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1196308194} + m_Enabled: 1 + serializedVersion: 3 + 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_CompositeOperation: 0 + m_CompositeOrder: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 2.68, y: 1.07} + newSize: {x: 2.68, y: 1.07} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Size: {x: 2.68, y: 1.07} + m_EdgeRadius: 0 +--- !u!50 &1196308197 +Rigidbody2D: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1196308194} + m_BodyType: 2 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDamping: 0 + m_AngularDamping: 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!212 &1196308198 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1196308194} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -4331849829665928538, guid: 8be45455b29f80241a3b8aae36291752, 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.68, y: 1.07} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 --- !u!1 &1219431442 GameObject: m_ObjectHideFlags: 0 @@ -2128,7 +2047,7 @@ GameObject: m_Component: - component: {fileID: 1219431443} m_Layer: 0 - m_Name: SpawnedObjects + m_Name: SpawnedTargets m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -2457,6 +2376,37 @@ MonoBehaviour: trajectoryPreview: {fileID: 1309397783} showDebugLogs: 0 airplanePrefab: {fileID: 2043346932243838886, guid: 582ed0c37f4ec6c4e930ddabea174eca, type: 3} +--- !u!1 &1405572708 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1405572709} + m_Layer: 0 + m_Name: SpawnedObstacles + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1405572709 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1405572708} + 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: 1784207402} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1414189130 PrefabInstance: m_ObjectHideFlags: 0 @@ -2570,6 +2520,172 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} m_Name: m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button +--- !u!1 &1451874670 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1451874671} + - component: {fileID: 1451874674} + - component: {fileID: 1451874673} + - component: {fileID: 1451874672} + m_Layer: 14 + m_Name: Ground (7) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1451874671 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451874670} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -172.2, y: -5, z: 0} + m_LocalScale: {x: 13.207894, y: 9.360231, z: 2.6263} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1701327424} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!61 &1451874672 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451874670} + m_Enabled: 1 + serializedVersion: 3 + 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_CompositeOperation: 0 + m_CompositeOrder: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 2.68, y: 1.07} + newSize: {x: 2.68, y: 1.07} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Size: {x: 2.68, y: 1.07} + m_EdgeRadius: 0 +--- !u!50 &1451874673 +Rigidbody2D: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451874670} + m_BodyType: 2 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDamping: 0 + m_AngularDamping: 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!212 &1451874674 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1451874670} + 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_ForceMeshLod: -1 + m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -4331849829665928538, guid: 8be45455b29f80241a3b8aae36291752, 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.68, y: 1.07} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 --- !u!1 &1467194712 GameObject: m_ObjectHideFlags: 0 @@ -2770,97 +2886,6 @@ SpriteRenderer: m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_SpriteSortPoint: 0 ---- !u!1 &1512788409 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1512788410} - - component: {fileID: 1512788411} - m_Layer: 0 - m_Name: Bush (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1512788410 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1512788409} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -3.7, y: 0.40000153, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1512788411 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1512788409} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &1520040324 GameObject: m_ObjectHideFlags: 0 @@ -3045,97 +3070,6 @@ Transform: m_Children: [] m_Father: {fileID: 1309397782} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1587396499 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1587396500} - - component: {fileID: 1587396501} - m_Layer: 0 - m_Name: Bush (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1587396500 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1587396499} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -26.699999, y: 4.1000013, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1587396501 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1587396499} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &1611333929 GameObject: m_ObjectHideFlags: 0 @@ -3558,9 +3492,10 @@ Transform: m_Children: - {fileID: 881483169} - {fileID: 2145467375} + - {fileID: 1451874671} + - {fileID: 1196308195} + - {fileID: 830587230} - {fileID: 196947012} - - {fileID: 815418544} - - {fileID: 340229587} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1710395162 @@ -3591,15 +3526,7 @@ Transform: m_LocalPosition: {x: 31.34338, y: -2.21682, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1140411105} - - {fileID: 1587396500} - - {fileID: 1827334365} - - {fileID: 1512788410} - - {fileID: 469774136} - - {fileID: 1836836830} - - {fileID: 1897459174} - - {fileID: 695066655} + m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1723844486 @@ -3702,6 +3629,9 @@ GameObject: m_Component: - component: {fileID: 1784207402} - component: {fileID: 1784207403} + - component: {fileID: 1784207404} + - component: {fileID: 1784207406} + - component: {fileID: 1784207405} m_Layer: 0 m_Name: SpawnManager m_TagString: Untagged @@ -3718,12 +3648,14 @@ Transform: m_GameObject: {fileID: 1784207401} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 17.2, y: -0.1, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1219431443} + - {fileID: 1405572709} - {fileID: 1287102785} + - {fileID: 377530945} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1784207403 @@ -3738,6 +3670,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 70f14ee4b04b46b793ec2652fd2ca7b9, type: 3} m_Name: m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Core.AirplaneSpawnManager + obstacleSpawner: {fileID: 1784207404} + groundSpawner: {fileID: 1784207406} + parallaxSpawner: {fileID: 1784207405} targetPrefabs: - targetKey: bob_target prefab: {fileID: 3207629437433571205, guid: 9f4bb48933059e543b60ac782d2140d8, type: 3} @@ -3751,42 +3686,117 @@ MonoBehaviour: specifiedY: 0 randomYMin: -5 randomYMax: 5 - positiveObjectPrefabs: - - prefab: {fileID: 497267990420767357, guid: dc32284941c693c4f9e422f4197ca61e, type: 3} - spawnPositionMode: 2 - specifiedY: 0 - randomYMin: 3 - randomYMax: 40 - - prefab: {fileID: 1917678391913987792, guid: 989121c9099e41e469824ddeaf0e34a5, type: 3} - spawnPositionMode: 0 - specifiedY: 0 - randomYMin: 5 - randomYMax: 20 - - prefab: {fileID: 7032677151789119314, guid: 7dc33e43acead834ba6a231b67cfd2d9, type: 3} - spawnPositionMode: 2 - specifiedY: 0 - randomYMin: 3 - randomYMax: 40 - negativeObjectPrefabs: - - prefab: {fileID: 1186710456879913970, guid: 006b956651124704dbae5bd4faab3152, type: 3} - spawnPositionMode: 2 - specifiedY: 0 - randomYMin: 3 - randomYMax: 40 - - prefab: {fileID: 2434350760695575337, guid: f3188909ff4e845499a5cbfd0ae93101, type: 3} - spawnPositionMode: 2 - specifiedY: 0 - randomYMin: 3 - randomYMax: 40 - groundTilePrefabs: - - {fileID: 5175967588203935335, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} targetDisplayUI: {fileID: 1520040329} launchController: {fileID: 1309397785} dynamicSpawnThresholdMarker: {fileID: 1653173574} - spawnedObjectsParent: {fileID: 1219431443} - groundTilesParent: {fileID: 1287102785} - groundSpawnY: -5 + obstacleContainer: {fileID: 1405572709} + groundContainer: {fileID: 1287102785} + parallaxContainer: {fileID: 377530945} + targetParent: {fileID: 1219431443} showDebugLogs: 0 +--- !u!114 &1784207404 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784207401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0a550c256a3d4d91a17adf6d0338f022, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Core.Spawning.ObstacleDistanceSpawner + poolMode: 0 + pools: + - prefabs: + - {fileID: 497267990420767357, guid: dc32284941c693c4f9e422f4197ca61e, type: 3} + - {fileID: 1917678391913987792, guid: 989121c9099e41e469824ddeaf0e34a5, type: 3} + - {fileID: 7032677151789119314, guid: 7dc33e43acead834ba6a231b67cfd2d9, type: 3} + unlockTime: 0 + description: Base pool of positive obstacles + overrideMinDistance: 0 + overrideMaxDistance: 0 + - prefabs: + - {fileID: 1186710456879913970, guid: 006b956651124704dbae5bd4faab3152, type: 3} + - {fileID: 2434350760695575337, guid: f3188909ff4e845499a5cbfd0ae93101, type: 3} + unlockTime: 0 + description: Base pool of negative obstacles + overrideMinDistance: 0 + overrideMaxDistance: 0 +--- !u!114 &1784207405 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784207401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b126f2d189024140ac0bc6fb14155c7f, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Core.Spawning.ParallaxBackgroundSpawner + poolMode: 0 + pools: + - prefabs: + - {fileID: 5151173141545254425, guid: b0d1bfa4dea596a43b14726844143958, type: 3} + - {fileID: 5151173141545254425, guid: d9c2ddaa5d7acfa41b1ed92a1564560f, type: 3} + - {fileID: 5151173141545254425, guid: 04a5ea4c8c227d04e9d66c5bd183f127, type: 3} + - {fileID: 5151173141545254425, guid: 2d826ffbbf2b169419cbaf1b9fd5adf9, type: 3} + - {fileID: 5151173141545254425, guid: 553fdd7acf88ffc4b9d300906b9d5084, type: 3} + - {fileID: 5151173141545254425, guid: 41b5f43daaa530644b39097f4ec95104, type: 3} + unlockTime: 0 + description: Background Layer + overrideMinDistance: 20 + overrideMaxDistance: 40 + - prefabs: + - {fileID: 3707466564348580456, guid: 1b55130d1450b0741961df1fc7337f29, type: 3} + - {fileID: 3707466564348580456, guid: 96866019d4dc15f4387ddad1333634ab, type: 3} + - {fileID: 3707466564348580456, guid: a27a76cd67e25fe4fbeea326f594ec2c, type: 3} + - {fileID: 3707466564348580456, guid: d4dc2ca39d101a446a6ca7afe8acdfcf, type: 3} + - {fileID: 3707466564348580456, guid: d87cc6288dbb4464582a0c96dfca4607, type: 3} + unlockTime: 0 + description: Middle Layer + overrideMinDistance: 30 + overrideMaxDistance: 60 + - prefabs: + - {fileID: 2405005885826663060, guid: 745fab545f64b0642b978cd5ba65e51d, type: 3} + - {fileID: 2405005885826663060, guid: 2b45d26d0e98cce4c82fc7414805edfa, type: 3} + - {fileID: 2405005885826663060, guid: 63558e5ef317da348a0dc24bade05b93, type: 3} + - {fileID: 6834004734717855054, guid: 56c7f78165748d14e904ce970995ed85, type: 3} + - {fileID: 2439114276580390837, guid: 7e8f54df4c74f8f4a877d5729286fe5a, type: 3} + unlockTime: 0 + description: Foreground Layer + overrideMinDistance: 15 + overrideMaxDistance: 30 + parallaxSortLayer: Background + backgroundSortOrder: -50 + sortOrderIncrement: 10 + globalStrength: 0.2 + backgroundSpeed: 0.1 + middleSpeed: 0.5 + foregroundSpeed: 1 + cameraManager: {fileID: 597044886} +--- !u!114 &1784207406 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1784207401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76db01f1871c4b9ea66fb981b01b3ee1, type: 3} + m_Name: + m_EditorClassIdentifier: AppleHillsScripts::Minigames.Airplane.Core.Spawning.GroundDistanceSpawner + poolMode: 0 + pools: + - prefabs: + - {fileID: 5175967588203935335, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} + unlockTime: 0 + description: + overrideMinDistance: 0 + overrideMaxDistance: 0 + groundSpawnY: -18 --- !u!1 &1810521056 GameObject: m_ObjectHideFlags: 0 @@ -3957,188 +3967,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1827334364 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1827334365} - - component: {fileID: 1827334366} - m_Layer: 0 - m_Name: Bush (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1827334365 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1827334364} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -24.699999, y: 2.3000011, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1827334366 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1827334364} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 ---- !u!1 &1836836829 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1836836830} - - component: {fileID: 1836836831} - m_Layer: 0 - m_Name: Bush (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1836836830 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1836836829} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2.5, y: 0.30000114, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1836836831 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1836836829} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: -7357922426693696371, guid: 5ff790e31ebc32b49a164889b673a882, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &1842736649 GameObject: m_ObjectHideFlags: 0 @@ -4234,97 +4062,6 @@ MonoBehaviour: RotationDamping: {x: 1, y: 1, z: 1} QuaternionDamping: 1 FollowOffset: {x: 0, y: 0, z: -10} ---- !u!1 &1897459173 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1897459174} - - component: {fileID: 1897459175} - m_Layer: 0 - m_Name: Bush (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1897459174 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1897459173} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -13.9, y: 2.4000015, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1710395163} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!212 &1897459175 -SpriteRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1897459173} - 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_ForceMeshLod: -1 - m_MeshLodSelectionBias: 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_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 622133659 - m_SortingLayer: -1 - m_SortingOrder: 0 - m_MaskInteraction: 0 - m_Sprite: {fileID: 4974115186881715698, guid: e1aa947fcf3609045ba89a6ddb609ae3, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 8.15, y: 4.61} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_SpriteSortPoint: 0 --- !u!1 &1930014901 GameObject: m_ObjectHideFlags: 0 @@ -4993,37 +4730,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2041920295 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2041920296} - m_Layer: 0 - m_Name: GameObject - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2041920296 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041920295} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 16.8, y: 12.6, 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!1 &2049960991 GameObject: m_ObjectHideFlags: 0 @@ -5473,63 +5179,6 @@ SpriteRenderer: m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_SpriteSortPoint: 0 ---- !u!1001 &453576884181909409 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1701327424} - m_Modifications: - - target: {fileID: 5175967588203935335, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_Name - value: Ground (3) - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalPosition.x - value: -18.43789 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalPosition.y - value: -5 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5380908876971534942, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: a9b4569fcc08080479d99b9c3bcee089, type: 3} --- !u!1001 &6301221881690084032 PrefabInstance: m_ObjectHideFlags: 0 @@ -5654,5 +5303,4 @@ SceneRoots: - {fileID: 1017291799} - {fileID: 1064542409} - {fileID: 1701327424} - - {fileID: 2041920296} - {fileID: 1710395163} diff --git a/Assets/Scripts/Core/Settings/SettingsInterfaces.cs b/Assets/Scripts/Core/Settings/SettingsInterfaces.cs index a4f90f61..d7b47922 100644 --- a/Assets/Scripts/Core/Settings/SettingsInterfaces.cs +++ b/Assets/Scripts/Core/Settings/SettingsInterfaces.cs @@ -1,5 +1,6 @@ -using System.Collections.Generic; +using System.Collections.Generic; using AppleHills.Core.Settings; +using Minigames.Airplane.Data; using Minigames.StatueDressup.Data; using UnityEngine; @@ -344,11 +345,18 @@ namespace Core.Settings float PositiveNegativeRatio { get; } // 0-1, where 1 = all positive, 0 = all negative float SpawnDistanceAhead { get; } float GroundSpawnInterval { get; } + float RecencyPenaltyDuration { get; } // Time penalty for recently-spawned prefabs // Ground Snapping int GroundLayer { get; } float MaxGroundRaycastDistance { get; } - float DefaultObjectYOffset { get; } + float FallbackYPosition { get; } // Y position when SnapToGround fails OR when using SpecifiedY mode (universal fallback) + float GroundSpawnY { get; } + + // Default Obstacle Positioning (used when prefab has no PrefabSpawnEntryComponent) + SpawnPositionMode DefaultObstaclePositionMode { get; } + float DefaultObstacleRandomYMin { get; } // Min Y when DefaultObstaclePositionMode = RandomRange + float DefaultObstacleRandomYMax { get; } // Max Y when DefaultObstaclePositionMode = RandomRange // Debug bool ShowDebugLogs { get; } diff --git a/Assets/Scripts/Minigames/Airplane/Core/AirplaneCameraManager.cs b/Assets/Scripts/Minigames/Airplane/Core/AirplaneCameraManager.cs index 97138e3d..791b2efb 100644 --- a/Assets/Scripts/Minigames/Airplane/Core/AirplaneCameraManager.cs +++ b/Assets/Scripts/Minigames/Airplane/Core/AirplaneCameraManager.cs @@ -71,6 +71,35 @@ namespace Minigames.Airplane.Core #endregion + #region Camera Tracking API + + /// + /// Get the transform of the currently active camera. + /// Used by parallax elements to track camera movement. + /// + public Transform GetActiveCameraTransform() + { + var activeCamera = GetCamera(CurrentState); + return activeCamera != null ? activeCamera.transform : null; + } + + /// + /// Override to fire additional state changed events. + /// + public override void SwitchToState(AirplaneCameraState newState) + { + AirplaneCameraState oldState = CurrentState; + base.SwitchToState(newState); + + // Base class already fires OnStateChanged event, we just add logging + if (showDebugLogs) + { + Logging.Debug($"[AirplaneCameraManager] Camera state changed: {oldState} -> {newState}"); + } + } + + #endregion + #region Flight Camera Follow /// diff --git a/Assets/Scripts/Minigames/Airplane/Core/AirplaneGameManager.cs b/Assets/Scripts/Minigames/Airplane/Core/AirplaneGameManager.cs index c05c04ca..e1a4f12a 100644 --- a/Assets/Scripts/Minigames/Airplane/Core/AirplaneGameManager.cs +++ b/Assets/Scripts/Minigames/Airplane/Core/AirplaneGameManager.cs @@ -459,6 +459,8 @@ namespace Minigames.Airplane.Core if (showDebugLogs) Logging.Debug($"[AirplaneGameManager] Introducing {_currentPerson.PersonName}..."); + if (showDebugLogs) Logging.Debug($"[AirplaneGameManager] Checking camera state... Current: {(cameraManager != null ? cameraManager.CurrentState.ToString() : "NULL")}"); + // Blend to next person camera if not already there // (Person shuffle flow already blends to NextPerson, so might already be there) if (cameraManager != null && cameraManager.CurrentState != AirplaneCameraState.NextPerson) diff --git a/Assets/Scripts/Minigames/Airplane/Core/AirplaneSpawnManager.cs b/Assets/Scripts/Minigames/Airplane/Core/AirplaneSpawnManager.cs index 31ad5395..6f755899 100644 --- a/Assets/Scripts/Minigames/Airplane/Core/AirplaneSpawnManager.cs +++ b/Assets/Scripts/Minigames/Airplane/Core/AirplaneSpawnManager.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using AppleHills.Core.Settings; using Core; using Core.Lifecycle; using Core.Settings; +using Minigames.Airplane.Core.Spawning; using Minigames.Airplane.Data; using Minigames.Airplane.UI; using UnityEngine; @@ -12,8 +12,9 @@ using Random = UnityEngine.Random; namespace Minigames.Airplane.Core { /// - /// Manages dynamic spawning of targets, positive/negative objects, and ground tiles - /// as the airplane moves through the level. + /// Orchestrates spawning for the airplane minigame. + /// Manages target spawning and coordinates specialized spawners (obstacles, ground, parallax). + /// Tracks game time and propagates to spawners for pool unlocking. /// public class AirplaneSpawnManager : ManagedBehaviour { @@ -32,7 +33,7 @@ namespace Minigames.Airplane.Core public SpawnPositionMode spawnPositionMode = SpawnPositionMode.SnapToGround; [Tooltip("Y position to use (SpecifiedY mode)")] - public float specifiedY = 0f; + public float specifiedY; [Tooltip("Min Y for random range (RandomRange mode)")] public float randomYMin = -5f; @@ -45,19 +46,20 @@ namespace Minigames.Airplane.Core #region Inspector References - [Header("Prefab References")] + [Header("Spawner References")] + [Tooltip("Obstacle spawner (positive/negative objects)")] + [SerializeField] private ObstacleDistanceSpawner obstacleSpawner; + + [Tooltip("Ground tile spawner")] + [SerializeField] private GroundDistanceSpawner groundSpawner; + + [Tooltip("Parallax background spawner (optional)")] + [SerializeField] private ParallaxBackgroundSpawner parallaxSpawner; + + [Header("Target Configuration")] [Tooltip("Dictionary of target prefabs (key = target name)")] [SerializeField] private TargetPrefabEntry[] targetPrefabs; - [Tooltip("Array of positive object prefabs with spawn configuration")] - [SerializeField] private PrefabSpawnEntry[] positiveObjectPrefabs; - - [Tooltip("Array of negative object prefabs with spawn configuration")] - [SerializeField] private PrefabSpawnEntry[] negativeObjectPrefabs; - - [Tooltip("Array of ground tile prefabs")] - [SerializeField] private GameObject[] groundTilePrefabs; - [Header("UI")] [Tooltip("Target display UI component")] [SerializeField] private TargetDisplayUI targetDisplayUI; @@ -67,19 +69,22 @@ namespace Minigames.Airplane.Core [SerializeField] private AirplaneLaunchController launchController; [Header("Spawn Threshold")] - [Tooltip("Transform marker in scene where dynamic spawning begins (uses X position). If null, uses fallback from settings.")] + [Tooltip("Transform marker in scene where dynamic spawning begins (uses X position)")] [SerializeField] private Transform dynamicSpawnThresholdMarker; + [Header("Spawn Organization")] + [Tooltip("Parent transform for spawned obstacles (organization)")] + [SerializeField] private Transform obstacleContainer; + + [Tooltip("Parent transform for spawned ground tiles (organization)")] + [SerializeField] private Transform groundContainer; + + [Tooltip("Parent transform for spawned parallax elements (organization)")] + [SerializeField] private Transform parallaxContainer; + [Header("Spawn Parents")] - [Tooltip("Parent transform for spawned objects (optional, for organization)")] - [SerializeField] private Transform spawnedObjectsParent; - - [Tooltip("Parent transform for ground tiles (optional)")] - [SerializeField] private Transform groundTilesParent; - - [Header("Ground Settings")] - [Tooltip("Y position at which to spawn ground tiles")] - [SerializeField] private float groundSpawnY = -18f; + [Tooltip("Parent transform for spawned target (optional)")] + [SerializeField] private Transform targetParent; [Header("Debug")] [SerializeField] private bool showDebugLogs; @@ -101,15 +106,10 @@ namespace Minigames.Airplane.Core // Plane tracking private Transform _planeTransform; private bool _isSpawningActive; + private float _gameTime; // Spawning positions (distance-based) - private float _lastSpawnedX; // Tracks the furthest forward X position that has been pre-spawned - private float _nextObjectSpawnX; - private float _nextGroundSpawnX; - - // Spawn statistics (for weighted ratio adjustment) - private int _positiveSpawnCount; - private int _negativeSpawnCount; + private float _lastSpawnedX; // Adaptive spawn distance (persistent across retries) private float _furthestReachedX; @@ -135,42 +135,22 @@ namespace Minigames.Airplane.Core // Validate references ValidateReferences(); + + // Initialize all spawners + InitializeSpawners(); } private void Update() { if (!_isSpawningActive || _planeTransform == null) return; - float planeX = _planeTransform.position.x; + float deltaTime = Time.deltaTime; + _gameTime += deltaTime; - // Track furthest X position reached - if (planeX > _furthestReachedX) - { - _furthestReachedX = planeX; - } + // Update spawner game times for pool unlocking + UpdateSpawnerTimes(deltaTime); - // Check if plane has reached the point where we need to continue spawning beyond pre-spawned content - // Only spawn new content if plane is beyond previous furthest point (for retries) - bool shouldSpawnNewContent = !_isRetryAttempt || planeX > (_furthestReachedX - _settings.SpawnDistanceAhead); - - if (shouldSpawnNewContent) - { - // Continue spawning objects when plane approaches the last spawned position - float spawnTriggerX = _lastSpawnedX + _settings.SpawnDistanceAhead; - if (planeX >= spawnTriggerX && planeX >= _nextObjectSpawnX) - { - SpawnRandomObject(); - ScheduleNextObjectSpawn(planeX); - } - - // Continue spawning ground tiles ahead of plane - float groundSpawnTargetX = planeX + GetGroundSpawnAheadDistance(); - while (_nextGroundSpawnX < groundSpawnTargetX) - { - SpawnGroundTile(); - _nextGroundSpawnX += _settings.GroundSpawnInterval; - } - } + // Dynamic spawning is handled by coroutine (SpawnUpdateCoroutine) } #endregion @@ -180,7 +160,6 @@ namespace Minigames.Airplane.Core /// /// Initialize the spawn system for a new game. /// Determines target spawn position and sets up UI, but doesn't spawn target yet. - /// Target will spawn when plane gets within spawn distance. /// /// Key of the target to spawn /// True if this is a retry attempt (keeps existing spawned objects and target position) @@ -189,13 +168,12 @@ namespace Minigames.Airplane.Core _currentTargetKey = targetKey; _isSpawningActive = false; _isRetryAttempt = isRetry; + _gameTime = 0f; // Only reset target and spawn state if NOT a retry if (!isRetry) { _hasSpawnedTarget = false; - _positiveSpawnCount = 0; - _negativeSpawnCount = 0; _furthestReachedX = 0f; // Determine NEW target spawn distance @@ -204,7 +182,7 @@ namespace Minigames.Airplane.Core if (showDebugLogs) { - Logging.Debug($"[SpawnManager] Initialized NEW turn for target '{targetKey}' at distance {_targetDistance:F2}"); + Logging.Debug($"[AirplaneSpawnManager] Initialized NEW turn for target '{targetKey}' at distance {_targetDistance:F2}"); } } else @@ -212,14 +190,14 @@ namespace Minigames.Airplane.Core // Retry: Keep existing target position and spawned objects if (showDebugLogs) { - Logging.Debug($"[SpawnManager] Initialized RETRY for target '{targetKey}' at distance {_targetDistance:F2}, furthest reached: {_furthestReachedX:F2}"); + Logging.Debug($"[AirplaneSpawnManager] Initialized RETRY for target '{targetKey}' at distance {_targetDistance:F2}, furthest reached: {_furthestReachedX:F2}"); } } // Find target entry and extract icon WITHOUT spawning if (!_targetPrefabDict.TryGetValue(_currentTargetKey, out _currentTargetEntry)) { - Logging.Error($"[SpawnManager] Target prefab not found for key '{_currentTargetKey}'!"); + Logging.Error($"[AirplaneSpawnManager] Target prefab not found for key '{_currentTargetKey}'!"); return; } @@ -241,7 +219,7 @@ namespace Minigames.Airplane.Core { if (_targetPrefabToSpawn == null) { - Logging.Error("[SpawnManager] Cannot pre-spawn - target prefab not initialized! Call InitializeForGame first."); + Logging.Error("[AirplaneSpawnManager] Cannot pre-spawn - target prefab not initialized! Call InitializeForGame first."); return; } @@ -249,14 +227,14 @@ namespace Minigames.Airplane.Core { if (showDebugLogs) { - Logging.Debug("[SpawnManager] Target already spawned, skipping pre-spawn (retry scenario)"); + Logging.Debug("[AirplaneSpawnManager] Target already spawned, skipping pre-spawn (retry scenario)"); } return; } if (dynamicSpawnThresholdMarker == null) { - Logging.Error("[SpawnManager] Cannot pre-spawn - dynamicSpawnThresholdMarker not assigned!"); + Logging.Error("[AirplaneSpawnManager] Cannot pre-spawn - dynamicSpawnThresholdMarker not assigned!"); return; } @@ -266,57 +244,45 @@ namespace Minigames.Airplane.Core if (showDebugLogs) { - Logging.Debug($"[SpawnManager] Pre-spawning level from X={preSpawnStartX:F2} (threshold) to X={preSpawnEndX:F2} (target={_targetDistance:F2} + buffer={_settings.PreSpawnBeyondTargetDistance:F2})"); + Logging.Debug($"[AirplaneSpawnManager] Pre-spawning level from X={preSpawnStartX:F2} to X={preSpawnEndX:F2}"); } - // 1. Spawn ground tiles FIRST across entire range (so target can raycast) - float currentGroundX = preSpawnStartX; - while (currentGroundX <= preSpawnEndX) + // 1. Spawn ground tiles FIRST (so objects can raycast to them) + if (groundSpawner != null) { - SpawnGroundTileAt(currentGroundX); - currentGroundX += _settings.GroundSpawnInterval; - } - - // Set next ground spawn position beyond pre-spawn range - _nextGroundSpawnX = preSpawnEndX + _settings.GroundSpawnInterval; - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Ground tiles spawned, now spawning objects"); - } - - // 2. Spawn objects across entire range (skipping near target) - float currentObjectX = preSpawnStartX + Random.Range(_settings.ObjectSpawnMinDistance, _settings.ObjectSpawnMaxDistance); - - while (currentObjectX <= preSpawnEndX) - { - // Spawn object at this position - SpawnRandomObjectAt(currentObjectX); + groundSpawner.PreSpawn(preSpawnStartX, preSpawnEndX); - // Move to next spawn position (forward) - float spawnDistance = Random.Range(_settings.ObjectSpawnMinDistance, _settings.ObjectSpawnMaxDistance); - currentObjectX += spawnDistance; + // Force physics system to update so ground colliders are available for raycasting + Physics2D.SyncTransforms(); + + if (showDebugLogs) + { + Logging.Debug("[AirplaneSpawnManager] Physics synced after ground spawn"); + } } - if (showDebugLogs) + // 2. Spawn parallax background (if assigned) + if (parallaxSpawner != null) { - Logging.Debug($"[SpawnManager] Objects spawned, now spawning target with raycast"); + parallaxSpawner.PreSpawn(preSpawnStartX, preSpawnEndX); } - // 3. Spawn the target LAST (after ground exists for proper raycasting) + // 3. Spawn obstacles (after ground exists and physics updated) + if (obstacleSpawner != null) + { + obstacleSpawner.PreSpawn(preSpawnStartX, preSpawnEndX); + } + + // 4. Spawn the target LAST SpawnTarget(); _hasSpawnedTarget = true; - // 4. Store the furthest forward pre-spawn position as _lastSpawnedX + // 5. Store the furthest forward pre-spawn position _lastSpawnedX = preSpawnEndX; - // 5. Schedule next object spawn beyond the pre-spawn range - _nextObjectSpawnX = preSpawnEndX + Random.Range(_settings.ObjectSpawnMinDistance, _settings.ObjectSpawnMaxDistance); - if (showDebugLogs) { - Logging.Debug($"[SpawnManager] Pre-spawn complete! Last spawned X={_lastSpawnedX:F2}, next object at X={_nextObjectSpawnX:F2}"); - Logging.Debug($"[SpawnManager] Spawned {_positiveSpawnCount} positive and {_negativeSpawnCount} negative objects"); + Logging.Debug($"[AirplaneSpawnManager] Pre-spawn complete! Last spawned X={_lastSpawnedX:F2}"); } } @@ -328,24 +294,20 @@ namespace Minigames.Airplane.Core { _planeTransform = planeTransform; _isSpawningActive = true; + _gameTime = 0f; - // Initialize ground spawning position ahead of plane - _nextGroundSpawnX = _planeTransform.position.x + GetGroundSpawnAheadDistance(); + // Start spawn update coroutine + StartSpawnUpdates(); // Start UI tracking with calculated target position if (targetDisplayUI != null) { targetDisplayUI.StartTracking(planeTransform); - - if (showDebugLogs) - { - Logging.Debug("[SpawnManager] UI tracking started, distance updates will show"); - } } if (showDebugLogs) { - Logging.Debug("[SpawnManager] Started tracking airplane"); + Logging.Debug("[AirplaneSpawnManager] Started tracking airplane"); } } @@ -357,6 +319,9 @@ namespace Minigames.Airplane.Core _isSpawningActive = false; _planeTransform = null; + // Stop spawn update coroutine + StopSpawnUpdates(); + // Stop UI tracking if (targetDisplayUI != null) { @@ -365,31 +330,28 @@ namespace Minigames.Airplane.Core if (showDebugLogs) { - Logging.Debug("[SpawnManager] Stopped tracking"); + Logging.Debug("[AirplaneSpawnManager] Stopped tracking"); } } /// /// Show the target display UI. - /// Call when entering aiming state. /// public void ShowTargetUI() { if (targetDisplayUI != null) { - // Update distance and show UI (refreshes distance from launch point if plane not launched yet) targetDisplayUI.UpdateAndShow(); if (showDebugLogs) { - Logging.Debug("[SpawnManager] Target UI shown with updated distance"); + Logging.Debug("[AirplaneSpawnManager] Target UI shown"); } } } /// /// Hide the target display UI. - /// Call when target is successfully hit. /// public void HideTargetUI() { @@ -399,55 +361,52 @@ namespace Minigames.Airplane.Core if (showDebugLogs) { - Logging.Debug("[SpawnManager] Target UI hidden"); + Logging.Debug("[AirplaneSpawnManager] Target UI hidden"); } } } /// - /// Clean up all spawned objects (call on successful shot or game restart). - /// Destroys all spawned content including target, objects, and ground tiles. + /// Clean up all spawned objects. /// public void CleanupSpawnedObjects() { - if (spawnedObjectsParent != null) + // Cleanup spawners + if (obstacleSpawner != null) { - foreach (Transform child in spawnedObjectsParent) - { - Destroy(child.gameObject); - } + obstacleSpawner.Cleanup(); } - if (groundTilesParent != null) + if (groundSpawner != null) { - foreach (Transform child in groundTilesParent) - { - Destroy(child.gameObject); - } + groundSpawner.Cleanup(); } + if (parallaxSpawner != null) + { + parallaxSpawner.Cleanup(); + } + + // Cleanup target if (_spawnedTarget != null) { Destroy(_spawnedTarget); _spawnedTarget = null; } - // Reset all spawn state + // Reset state _hasSpawnedTarget = false; _furthestReachedX = 0f; - _positiveSpawnCount = 0; - _negativeSpawnCount = 0; + _gameTime = 0f; if (showDebugLogs) { - Logging.Debug("[SpawnManager] Full cleanup completed (success or game restart)"); + Logging.Debug("[AirplaneSpawnManager] Full cleanup completed"); } } /// /// Clean up level based on shot result. - /// Success: Full cleanup (destroys all spawned objects). - /// Failure: Reset for retry (keeps spawned objects, resets tracking). /// public void CleanupLevel(bool success) { @@ -457,7 +416,7 @@ namespace Minigames.Airplane.Core if (showDebugLogs) { - Logging.Debug("[SpawnManager] Level cleanup: SUCCESS - destroyed all objects"); + Logging.Debug("[AirplaneSpawnManager] Level cleanup: SUCCESS"); } } else @@ -466,23 +425,19 @@ namespace Minigames.Airplane.Core if (showDebugLogs) { - Logging.Debug("[SpawnManager] Level cleanup: FAILURE - kept objects for retry"); + Logging.Debug("[AirplaneSpawnManager] Level cleanup: FAILURE - kept objects for retry"); } } } /// - /// Reset tracking state for retry attempt (keeps spawned objects). - /// Call this when player fails and will retry the same shot. + /// Reset tracking state for retry attempt. /// public void ResetForRetry() { - // Don't destroy anything - keep all spawned objects and target - // Just reset the tracking state so spawning can continue if plane goes further - if (showDebugLogs) { - Logging.Debug($"[SpawnManager] Reset for retry (keeping spawned objects, furthest reached: {_furthestReachedX:F2})"); + Logging.Debug($"[AirplaneSpawnManager] Reset for retry (furthest reached: {_furthestReachedX:F2})"); } } @@ -496,7 +451,6 @@ namespace Minigames.Airplane.Core /// /// Get the spawned target's transform for camera tracking. - /// Returns null if target hasn't been spawned yet. /// public Transform GetSpawnedTargetTransform() { @@ -505,6 +459,132 @@ namespace Minigames.Airplane.Core #endregion + #region Spawner Management + + private void InitializeSpawners() + { + if (obstacleSpawner != null) + { + var initParams = new SpawnInitParameters(obstacleContainer, _settings); + obstacleSpawner.Initialize(initParams); + } + + if (groundSpawner != null) + { + var initParams = new SpawnInitParameters(groundContainer, _settings); + groundSpawner.Initialize(initParams); + } + + if (parallaxSpawner != null) + { + var initParams = new SpawnInitParameters(parallaxContainer, _settings); + parallaxSpawner.Initialize(initParams); + } + + if (showDebugLogs) + { + Logging.Debug("[AirplaneSpawnManager] All spawners initialized - distance-based spawning ready"); + } + } + + private void UpdateSpawnerTimes(float deltaTime) + { + if (obstacleSpawner != null) + { + obstacleSpawner.UpdateGameTime(deltaTime); + } + + if (groundSpawner != null) + { + groundSpawner.UpdateGameTime(deltaTime); + } + + if (parallaxSpawner != null) + { + parallaxSpawner.UpdateGameTime(deltaTime); + } + } + + private Coroutine _spawnUpdateCoroutine; + + /// + /// Coroutine that periodically updates spawn horizons for all spawners. + /// Runs every 0.2 seconds while plane is active. + /// + private System.Collections.IEnumerator SpawnUpdateCoroutine() + { + WaitForSeconds wait = new WaitForSeconds(0.2f); + + while (_isSpawningActive && _planeTransform != null) + { + float planeX = _planeTransform.position.x; + + // Track furthest X position reached + if (planeX > _furthestReachedX) + { + _furthestReachedX = planeX; + } + + // Check if plane should trigger new spawning + bool shouldSpawnNewContent = !_isRetryAttempt || planeX > (_furthestReachedX - _settings.SpawnDistanceAhead); + + if (shouldSpawnNewContent) + { + // Push spawn horizons to spawners - they decide independently if spawning is needed + + // Obstacles - standard spawn distance + if (obstacleSpawner != null) + { + float obstacleHorizon = planeX + _settings.SpawnDistanceAhead; + obstacleSpawner.UpdateSpawnHorizon(obstacleHorizon); + } + + // Ground - spawn further ahead (2x distance) + if (groundSpawner != null) + { + float groundHorizon = planeX + (_settings.SpawnDistanceAhead * 2f); + groundSpawner.UpdateSpawnHorizon(groundHorizon); + } + + // Parallax - spawn at 1.5x distance, each pool spawns independently + if (parallaxSpawner != null) + { + float parallaxHorizon = planeX + (_settings.SpawnDistanceAhead * 1.5f); + parallaxSpawner.UpdateSpawnHorizon(parallaxHorizon); + } + } + + yield return wait; + } + + if (showDebugLogs) + { + Logging.Debug("[AirplaneSpawnManager] Spawn update coroutine stopped"); + } + } + + private void StartSpawnUpdates() + { + StopSpawnUpdates(); + _spawnUpdateCoroutine = StartCoroutine(SpawnUpdateCoroutine()); + + if (showDebugLogs) + { + Logging.Debug("[AirplaneSpawnManager] Started spawn update coroutine"); + } + } + + private void StopSpawnUpdates() + { + if (_spawnUpdateCoroutine != null) + { + StopCoroutine(_spawnUpdateCoroutine); + _spawnUpdateCoroutine = null; + } + } + + #endregion + #region Initialization /// @@ -556,37 +636,37 @@ namespace Minigames.Airplane.Core { if (_settings == null) { - Logging.Error("[SpawnManager] Could not load IAirplaneSettings!"); + Logging.Error("[AirplaneSpawnManager] Could not load IAirplaneSettings!"); } - if (positiveObjectPrefabs == null || positiveObjectPrefabs.Length == 0) + if (obstacleSpawner == null) { - Logging.Warning("[SpawnManager] No positive object prefabs assigned!"); + Logging.Warning("[AirplaneSpawnManager] Obstacle spawner not assigned!"); } - if (negativeObjectPrefabs == null || negativeObjectPrefabs.Length == 0) + if (groundSpawner == null) { - Logging.Warning("[SpawnManager] No negative object prefabs assigned!"); + Logging.Warning("[AirplaneSpawnManager] Ground spawner not assigned!"); } - if (groundTilePrefabs == null || groundTilePrefabs.Length == 0) + if (parallaxSpawner == null) { - Logging.Warning("[SpawnManager] No ground tile prefabs assigned!"); + Logging.Warning("[AirplaneSpawnManager] Parallax spawner not assigned (optional)"); } if (targetDisplayUI == null) { - Logging.Warning("[SpawnManager] Target display UI not assigned!"); + Logging.Warning("[AirplaneSpawnManager] Target display UI not assigned!"); } if (launchController == null) { - Logging.Warning("[SpawnManager] Launch controller not assigned! Distance calculation will use world origin."); + Logging.Warning("[AirplaneSpawnManager] Launch controller not assigned!"); } if (dynamicSpawnThresholdMarker == null) { - Logging.Warning("[SpawnManager] Dynamic spawn threshold marker not assigned! Pre-spawn will fail."); + Logging.Warning("[AirplaneSpawnManager] Dynamic spawn threshold marker not assigned!"); } } @@ -615,9 +695,9 @@ namespace Minigames.Airplane.Core // Spawn target at determined position _spawnedTarget = Instantiate(_currentTargetEntry.prefab, _targetSpawnPosition, Quaternion.identity); - if (spawnedObjectsParent != null) + if (targetParent != null) { - _spawnedTarget.transform.SetParent(spawnedObjectsParent); + _spawnedTarget.transform.SetParent(targetParent); } // Position target using configured spawn mode (will refine Y if needed) @@ -668,9 +748,9 @@ namespace Minigames.Airplane.Core } else { - // No ground found - use default - Logging.Warning($"[SpawnManager] No ground found for target at X={xPosition:F2} (raycast from Y=20 for {_settings.MaxGroundRaycastDistance} units), using default Y={_settings.DefaultObjectYOffset}"); - return _settings.DefaultObjectYOffset; + // No ground found - use fallback + Logging.Warning($"[SpawnManager] No ground found for target at X={xPosition:F2} (raycast from Y=20 for {_settings.MaxGroundRaycastDistance} units), using fallback Y={_settings.FallbackYPosition}"); + return _settings.FallbackYPosition; } } @@ -747,410 +827,26 @@ namespace Minigames.Airplane.Core #endregion - #region Dynamic Spawning - - /// - /// Get the distance ahead to spawn ground (2x object spawn distance). - /// - private float GetGroundSpawnAheadDistance() - { - return _settings.SpawnDistanceAhead * 2f; - } - - /// - /// Schedule the next object spawn based on random distance from current position. - /// - /// Current X position (usually plane's X or last spawn X) - private void ScheduleNextObjectSpawn(float currentX) - { - float spawnDistance = Random.Range(_settings.ObjectSpawnMinDistance, _settings.ObjectSpawnMaxDistance); - _nextObjectSpawnX = currentX + spawnDistance; - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Next object scheduled at X={_nextObjectSpawnX:F2} (distance: {spawnDistance:F2} from {currentX:F2})"); - } - } - - /// - /// Spawn a random positive or negative object. - /// Uses weighted randomness to maintain target ratio. - /// Avoids spawning near target position to prevent obscuring it. - /// Objects spawn at look-ahead distance to ensure they're off-screen. - /// - private void SpawnRandomObject() - { - if (_planeTransform == null) return; - - // Spawn at look-ahead distance from plane's current position - // This ensures objects always spawn off-screen - float spawnX = _planeTransform.position.x + _settings.SpawnDistanceAhead; - - // Check if spawn position is too close to target (avoid obscuring it) - float distanceToTarget = Mathf.Abs(spawnX - _targetSpawnPosition.x); - float targetClearanceZone = 10f; // Don't spawn within 10 units of target - - if (distanceToTarget < targetClearanceZone) - { - // Too close to target, skip this spawn and schedule the next one - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Skipped object spawn at X={spawnX:F2} (too close to target at X={_targetSpawnPosition.x:F2})"); - } - // Schedule next spawn further ahead - ScheduleNextObjectSpawn(spawnX); - return; - } - - // Determine if spawning positive or negative based on weighted ratio - bool spawnPositive = ShouldSpawnPositive(); - - PrefabSpawnEntry entryToSpawn = null; - - if (spawnPositive) - { - if (positiveObjectPrefabs != null && positiveObjectPrefabs.Length > 0) - { - entryToSpawn = positiveObjectPrefabs[UnityEngine.Random.Range(0, positiveObjectPrefabs.Length)]; - _positiveSpawnCount++; - } - } - else - { - if (negativeObjectPrefabs != null && negativeObjectPrefabs.Length > 0) - { - entryToSpawn = negativeObjectPrefabs[UnityEngine.Random.Range(0, negativeObjectPrefabs.Length)]; - _negativeSpawnCount++; - } - } - - if (entryToSpawn == null || entryToSpawn.prefab == null) return; - - - // Spawn object at temporary position - Vector3 tempPosition = new Vector3(spawnX, 0f, 0f); - GameObject spawnedObject = Instantiate(entryToSpawn.prefab, tempPosition, Quaternion.identity); - - if (spawnedObjectsParent != null) - { - spawnedObject.transform.SetParent(spawnedObjectsParent); - } - - // Position object using entry's spawn configuration - PositionObject(spawnedObject, spawnX, - entryToSpawn.spawnPositionMode, - entryToSpawn.specifiedY, - entryToSpawn.randomYMin, - entryToSpawn.randomYMax); - - // Initialize components that need post-spawn setup - var initializable = spawnedObject.GetComponent(); - if (initializable != null) - { - initializable.Initialize(); - } - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Spawned {(spawnPositive ? "positive" : "negative")} object at {spawnedObject.transform.position}"); - } - } - - /// - /// Determine if next spawn should be positive based on weighted ratio. - /// Adjusts to maintain target positive/negative ratio. - /// - private bool ShouldSpawnPositive() - { - int totalSpawned = _positiveSpawnCount + _negativeSpawnCount; - - // First few spawns - use pure random based on ratio - if (totalSpawned < 5) - { - return UnityEngine.Random.value <= _settings.PositiveNegativeRatio; - } - - // Calculate current ratio - float currentRatio = totalSpawned > 0 ? (float)_positiveSpawnCount / totalSpawned : 0.5f; - float targetRatio = _settings.PositiveNegativeRatio; - - // If we're below target ratio, heavily favor positive - // If we're above target ratio, heavily favor negative - float adjustedProbability; - if (currentRatio < targetRatio) - { - // Need more positive - increase probability - adjustedProbability = Mathf.Lerp(targetRatio, 1f, (targetRatio - currentRatio) * 2f); - } - else - { - // Need more negative - decrease probability - adjustedProbability = Mathf.Lerp(0f, targetRatio, 1f - (currentRatio - targetRatio) * 2f); - } - - return UnityEngine.Random.value <= adjustedProbability; - } - - /// - /// Spawn a ground tile at the next ground spawn position. - /// - private void SpawnGroundTile() - { - if (groundTilePrefabs == null || groundTilePrefabs.Length == 0) return; - - // Pick random ground tile - GameObject tilePrefab = groundTilePrefabs[Random.Range(0, groundTilePrefabs.Length)]; - - // Calculate spawn position using configured Y - Vector3 spawnPosition = new Vector3(_nextGroundSpawnX, groundSpawnY, 0f); - - // Spawn tile - GameObject spawnedTile = Instantiate(tilePrefab, spawnPosition, Quaternion.identity); - - if (groundTilesParent != null) - { - spawnedTile.transform.SetParent(groundTilesParent); - } - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Spawned ground tile at ({_nextGroundSpawnX:F2}, {groundSpawnY:F2})"); - } - } - - /// - /// Spawn a ground tile at a specific X position (used for pre-spawn). - /// - private void SpawnGroundTileAt(float xPosition) - { - if (groundTilePrefabs == null || groundTilePrefabs.Length == 0) return; - - // Pick random ground tile - GameObject tilePrefab = groundTilePrefabs[Random.Range(0, groundTilePrefabs.Length)]; - - // Calculate spawn position using configured Y - Vector3 spawnPosition = new Vector3(xPosition, groundSpawnY, 0f); - - // Spawn tile - GameObject spawnedTile = Instantiate(tilePrefab, spawnPosition, Quaternion.identity); - - if (groundTilesParent != null) - { - spawnedTile.transform.SetParent(groundTilesParent); - } - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Pre-spawned ground tile at ({xPosition:F2}, {groundSpawnY:F2})"); - } - } - - /// - /// Spawn a random positive or negative object at a specific X position (used for pre-spawn). - /// - private void SpawnRandomObjectAt(float xPosition) - { - // Check if spawn position is too close to target (avoid obscuring it) - float distanceToTarget = Mathf.Abs(xPosition - _targetSpawnPosition.x); - float targetClearanceZone = 10f; // Don't spawn within 10 units of target - - if (distanceToTarget < targetClearanceZone) - { - // Too close to target, skip this spawn - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Skipped pre-spawn at X={xPosition:F2} (too close to target at X={_targetSpawnPosition.x:F2})"); - } - return; - } - - // Determine if spawning positive or negative based on weighted ratio - bool spawnPositive = ShouldSpawnPositive(); - - PrefabSpawnEntry entryToSpawn = null; - - if (spawnPositive) - { - if (positiveObjectPrefabs != null && positiveObjectPrefabs.Length > 0) - { - entryToSpawn = positiveObjectPrefabs[Random.Range(0, positiveObjectPrefabs.Length)]; - _positiveSpawnCount++; - } - } - else - { - if (negativeObjectPrefabs != null && negativeObjectPrefabs.Length > 0) - { - entryToSpawn = negativeObjectPrefabs[Random.Range(0, negativeObjectPrefabs.Length)]; - _negativeSpawnCount++; - } - } - - if (entryToSpawn == null || entryToSpawn.prefab == null) return; - - // Spawn object at temporary position - Vector3 tempPosition = new Vector3(xPosition, 0f, 0f); - GameObject spawnedObject = Instantiate(entryToSpawn.prefab, tempPosition, Quaternion.identity); - - if (spawnedObjectsParent != null) - { - spawnedObject.transform.SetParent(spawnedObjectsParent); - } - - // Position object using entry's spawn configuration - PositionObject(spawnedObject, xPosition, - entryToSpawn.spawnPositionMode, - entryToSpawn.specifiedY, - entryToSpawn.randomYMin, - entryToSpawn.randomYMax); - - // Initialize components that need post-spawn setup - var initializable = spawnedObject.GetComponent(); - if (initializable != null) - { - initializable.Initialize(); - } - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Pre-spawned {(spawnPositive ? "positive" : "negative")} object at {spawnedObject.transform.position}"); - } - } - - #endregion - - #region Object Positioning + #region Object Positioning Helpers /// /// Position an object based on the specified spawn mode. + /// Delegates to PositioningUtility for all positioning logic. /// - /// Object to position - /// X position for the object - /// Spawn position mode to use - /// Y value for SpecifiedY mode - /// Min Y for RandomRange mode - /// Max Y for RandomRange mode private void PositionObject(GameObject obj, float xPosition, SpawnPositionMode mode, float specifiedY, float randomYMin, float randomYMax) { - if (obj == null) return; - - float targetY; - - switch (mode) - { - case SpawnPositionMode.SnapToGround: - targetY = SnapToGround(obj, xPosition); - break; - - case SpawnPositionMode.SpecifiedY: - targetY = specifiedY; - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Positioned object at specified Y={targetY:F2}"); - } - break; - - case SpawnPositionMode.RandomRange: - targetY = Random.Range(randomYMin, randomYMax); - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Positioned object at random Y={targetY:F2} (range: {randomYMin:F2} to {randomYMax:F2})"); - } - break; - - default: - Logging.Error($"[SpawnManager] Unknown spawn position mode: {mode}"); - targetY = 0f; - break; - } - - // Apply position - Vector3 newPosition = obj.transform.position; - newPosition.y = targetY; - obj.transform.position = newPosition; + Spawning.PositioningUtility.PositionObject(obj, xPosition, mode, specifiedY, randomYMin, randomYMax, + _settings, _settings.ShowDebugLogs); } /// - /// Snap an object to the ground using raycast. - /// Positions object so its bottom bounds touch the ground. - /// - /// Object to snap to ground - /// X position to raycast from - /// The Y position where object was snapped - private float SnapToGround(GameObject obj, float xPosition) - { - // Start raycast from high Y position - Vector2 rayOrigin = new Vector2(xPosition, 0.0f); - - // Raycast downward to find ground (convert layer to layer mask) - int layerMask = 1 << _settings.GroundLayer; - RaycastHit2D hit = Physics2D.Raycast( - rayOrigin, - Vector2.down, - _settings.MaxGroundRaycastDistance, - layerMask - ); - - float targetY; - - if (hit.collider != null) - { - // Found ground - calculate Y position - float groundY = hit.point.y; - - // Get object bounds - Bounds bounds = GetObjectBounds(obj); - float boundsBottomOffset = bounds.extents.y; // Half height - - // Position object so bottom touches ground - targetY = groundY + boundsBottomOffset; - - if (showDebugLogs) - { - Logging.Debug($"[SpawnManager] Snapped object to ground at Y={targetY:F2} (ground at {groundY:F2})"); - } - } - else - { - // No ground found - use default offset - targetY = _settings.DefaultObjectYOffset; - - Logging.Warning($"[SpawnManager] No ground found at X={xPosition}, using default Y={targetY}"); - } - - return targetY; - } - - /// - /// Get the bounds of an object from its Renderer or Collider. + /// Get the bounds of an object. + /// Delegates to PositioningUtility. /// private Bounds GetObjectBounds(GameObject obj) { - // Try Renderer first - Renderer objRenderer = obj.GetComponentInChildren(); - if (objRenderer != null) - { - return objRenderer.bounds; - } - - // Try Collider2D - Collider2D objCollider2D = obj.GetComponentInChildren(); - if (objCollider2D != null) - { - return objCollider2D.bounds; - } - - // Try Collider3D - Collider objCollider3D = obj.GetComponentInChildren(); - if (objCollider3D != null) - { - return objCollider3D.bounds; - } - - // Fallback - create minimal bounds - Logging.Warning($"[SpawnManager] No Renderer or Collider found on {obj.name}, using default bounds"); - return new Bounds(obj.transform.position, Vector3.one); + return Spawning.PositioningUtility.GetObjectBounds(obj); } #endregion diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning.meta b/Assets/Scripts/Minigames/Airplane/Core/Spawning.meta new file mode 100644 index 00000000..fdfcac7a --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5dc5cd57fce342659690bcf1c3411048 +timeCreated: 1765965907 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/BaseDistanceSpawner.cs b/Assets/Scripts/Minigames/Airplane/Core/Spawning/BaseDistanceSpawner.cs new file mode 100644 index 00000000..eea84b2e --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/BaseDistanceSpawner.cs @@ -0,0 +1,475 @@ +using System.Collections.Generic; +using Core; +using Core.Lifecycle; +using Core.Settings; +using Minigames.Airplane.Data; +using UnityEngine; + +namespace Minigames.Airplane.Core.Spawning +{ + /// + /// Base class for distance-based spawners in the airplane minigame. + /// Handles pool management, time-based unlocking, distance tracking, and recency diversity. + /// All spawn parameters (distances, recency, positioning, debug) are configured in AirplaneSettings. + /// Derived classes implement specific spawn logic via SpawnFromPool. + /// Orchestrator (AirplaneSpawnManager) handles distance checking and calls SpawnNext when needed. + /// + public abstract class BaseDistanceSpawner : ManagedBehaviour + { + #region Inspector Fields + + [Header("Pool Configuration")] + [Tooltip("How pools are combined: Together = shared spawn stream, Exclusive = independent spawning")] + [SerializeField] protected SpawnPoolMode poolMode = SpawnPoolMode.Together; + + [Tooltip("Spawn pools ordered by difficulty/progression")] + [SerializeField] protected SpawnPoolConfig[] pools; + + #endregion + + #region State + + // Shared references (set by orchestrator via SpawnInitParameters) + protected Transform spawnContainer; + protected IAirplaneSettings settings; + + // Tracking + protected float GameTime; + protected float LastSpawnedX; + + // Pool state + protected List UnlockedPoolIndices = new List(); + protected Dictionary LastUsedTimes = new Dictionary(); + + // Together mode state + protected float NextSpawnX; + + // Exclusive mode state + protected Dictionary PoolNextSpawnX = new Dictionary(); + + #endregion + + #region Initialization + + /// + /// Initialize the spawner with shared configuration. Call this before starting spawning. + /// + /// Initialization parameters containing shared references + public virtual void Initialize(SpawnInitParameters initParams) + { + // Store shared references + spawnContainer = initParams.SpawnContainer; + settings = initParams.Settings; + + ValidateConfiguration(); + + // Unlock pool 0 immediately + if (pools != null && pools.Length > 0) + { + UnlockedPoolIndices.Add(0); + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Initialized with pool 0 unlocked"); + } + } + + // Initialize exclusive mode spawn positions if needed + if (poolMode == SpawnPoolMode.Exclusive) + { + if (pools != null) + { + for (int i = 0; i < pools.Length; i++) + { + PoolNextSpawnX[i] = 0f; + } + } + } + } + + protected virtual void ValidateConfiguration() + { + if (pools == null || pools.Length == 0) + { + Logging.Error($"[{GetType().Name}] No pools configured!"); + return; + } + + // Validate pool unlock times are monotonically increasing + for (int i = 1; i < pools.Length; i++) + { + if (pools[i].unlockTime < pools[i - 1].unlockTime) + { + Logging.Warning($"[{GetType().Name}] Pool {i} unlock time ({pools[i].unlockTime}s) is earlier than pool {i-1} ({pools[i-1].unlockTime}s)!"); + } + } + } + + #endregion + + #region Public API + + /// + /// Update game time and check for pool unlocks. + /// Call this every frame from the orchestrator. + /// + public void UpdateGameTime(float deltaTime) + { + GameTime += deltaTime; + CheckPoolUnlocks(); + } + + /// + /// Update the spawn horizon and spawn objects if needed. + /// Called by orchestrator to push spawn updates. + /// Each spawner independently decides if spawning is needed. + /// + public virtual void UpdateSpawnHorizon(float horizonX) + { + if (poolMode == SpawnPoolMode.Together) + { + UpdateSpawnHorizonTogether(horizonX); + } + else // Exclusive mode - each pool checks independently + { + UpdateSpawnHorizonExclusive(horizonX); + } + } + + private void UpdateSpawnHorizonTogether(float horizonX) + { + // Keep spawning while next spawn point is behind the horizon + while (NextSpawnX < horizonX) + { + SpawnAtPosition(NextSpawnX); + LastSpawnedX = NextSpawnX; + NextSpawnX = LastSpawnedX + Random.Range(settings.ObjectSpawnMinDistance, settings.ObjectSpawnMaxDistance); + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Together mode: Spawned at {LastSpawnedX:F2}, next at {NextSpawnX:F2}"); + } + } + } + + private void UpdateSpawnHorizonExclusive(float horizonX) + { + // Each pool spawns independently based on its own position + foreach (int poolIndex in UnlockedPoolIndices) + { + if (poolIndex >= pools.Length || !pools[poolIndex].HasPrefabs) continue; + if (!PoolNextSpawnX.ContainsKey(poolIndex)) continue; + + float minDist = pools[poolIndex].GetMinDistance(settings.ObjectSpawnMinDistance); + float maxDist = pools[poolIndex].GetMaxDistance(settings.ObjectSpawnMaxDistance); + + // Keep spawning from this pool while its next spawn is behind horizon + while (PoolNextSpawnX[poolIndex] < horizonX) + { + SpawnFromPool(poolIndex, PoolNextSpawnX[poolIndex]); + PoolNextSpawnX[poolIndex] += Random.Range(minDist, maxDist); + LastSpawnedX = Mathf.Max(LastSpawnedX, PoolNextSpawnX[poolIndex]); + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Exclusive mode: Pool {poolIndex} spawned at {PoolNextSpawnX[poolIndex]:F2}"); + } + } + } + } + + /// + /// Pre-spawn objects from start to end X position. + /// + public virtual void PreSpawn(float startX, float endX) + { + if (poolMode == SpawnPoolMode.Together) + { + PreSpawnTogether(startX, endX); + } + else + { + PreSpawnExclusive(startX, endX); + } + + LastSpawnedX = endX; + } + + /// + /// Clean up all spawned objects. + /// + public virtual void Cleanup() + { + if (spawnContainer != null) + { + foreach (Transform child in spawnContainer) + { + Destroy(child.gameObject); + } + } + + LastUsedTimes.Clear(); + UnlockedPoolIndices.Clear(); + UnlockedPoolIndices.Add(0); // Re-add pool 0 + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Cleanup complete"); + } + } + + #endregion + + #region Pool Management + + protected void CheckPoolUnlocks() + { + for (int i = 1; i < pools.Length; i++) + { + if (UnlockedPoolIndices.Contains(i)) continue; + + if (GameTime >= pools[i].unlockTime) + { + UnlockedPoolIndices.Add(i); + + // If exclusive mode, initialize spawn position for this pool + if (poolMode == SpawnPoolMode.Exclusive) + { + float minDist = pools[i].GetMinDistance(settings.ObjectSpawnMinDistance); + float maxDist = pools[i].GetMaxDistance(settings.ObjectSpawnMaxDistance); + // Initialize at last spawned position plus random distance + PoolNextSpawnX[i] = LastSpawnedX + Random.Range(minDist, maxDist); + } + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Unlocked pool {i} '{pools[i].description}' at time {GameTime:F2}s"); + } + } + } + } + + protected virtual GameObject SelectPrefabFromPools(out int selectedPoolIndex) + { + selectedPoolIndex = -1; + + if (UnlockedPoolIndices.Count == 0) return null; + + // Build weighted list of all available prefabs + List availablePrefabs = new List(); + List prefabPoolIndices = new List(); + List prefabWeights = new List(); + + foreach (int poolIndex in UnlockedPoolIndices) + { + if (poolIndex >= pools.Length || !pools[poolIndex].HasPrefabs) continue; + + foreach (GameObject prefab in pools[poolIndex].prefabs) + { + if (prefab == null) continue; + + availablePrefabs.Add(prefab); + prefabPoolIndices.Add(poolIndex); + + // Calculate weight based on recency + float weight = 1f; + if (LastUsedTimes.TryGetValue(prefab, out float lastUsedTime)) + { + float timeSinceUse = GameTime - lastUsedTime; + if (timeSinceUse < settings.RecencyPenaltyDuration) + { + weight = timeSinceUse / settings.RecencyPenaltyDuration; // 0 to 1 linear recovery + } + } + + prefabWeights.Add(weight); + } + } + + if (availablePrefabs.Count == 0) return null; + + // Select using weighted random + int selectedIndex = WeightedRandom(prefabWeights); + GameObject selectedPrefab = availablePrefabs[selectedIndex]; + selectedPoolIndex = prefabPoolIndices[selectedIndex]; + + // Update recency + LastUsedTimes[selectedPrefab] = GameTime; + + return selectedPrefab; + } + + protected int WeightedRandom(List weights) + { + float totalWeight = 0f; + foreach (float w in weights) totalWeight += w; + + float randomValue = Random.Range(0f, totalWeight); + float cumulative = 0f; + + for (int i = 0; i < weights.Count; i++) + { + cumulative += weights[i]; + if (randomValue <= cumulative) return i; + } + + return weights.Count - 1; + } + + #endregion + + #region Together Mode Spawning + + protected virtual void PreSpawnTogether(float startX, float endX) + { + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] PreSpawnTogether START: Range X={startX:F2} to X={endX:F2}, Min/Max distance=[{settings.ObjectSpawnMinDistance:F1}-{settings.ObjectSpawnMaxDistance:F1}]"); + } + + float currentX = startX + Random.Range(settings.ObjectSpawnMinDistance, settings.ObjectSpawnMaxDistance); + int objectsSpawned = 0; + float firstSpawnX = currentX; + + while (currentX <= endX) + { + SpawnAtPosition(currentX); + objectsSpawned++; + currentX += Random.Range(settings.ObjectSpawnMinDistance, settings.ObjectSpawnMaxDistance); + } + + NextSpawnX = currentX; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] PreSpawnTogether COMPLETE: Spawned {objectsSpawned} objects from X={firstSpawnX:F2} to X={NextSpawnX:F2}"); + } + } + + #endregion + + #region Exclusive Mode Spawning + + protected virtual void PreSpawnExclusive(float startX, float endX) + { + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] PreSpawnExclusive START: Range X={startX:F2} to X={endX:F2}, Total pools={pools.Length}"); + } + + // Pre-spawn only from pools with unlockTime <= 0 (immediate availability) + // Pools with positive unlock times are meant to unlock during gameplay progression + int spawnedPoolCount = 0; + int skippedPoolCount = 0; + + for (int poolIndex = 0; poolIndex < pools.Length; poolIndex++) + { + if (!pools[poolIndex].HasPrefabs) + { + if (settings.ShowDebugLogs) + { + Logging.Warning($"[{GetType().Name}] Pool {poolIndex} skipped - no prefabs assigned"); + } + skippedPoolCount++; + continue; + } + + // Skip pools that unlock later during gameplay + if (pools[poolIndex].unlockTime > 0f) + { + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Pool {poolIndex} '{pools[poolIndex].description}' skipped - unlockTime={pools[poolIndex].unlockTime}s (will unlock during gameplay)"); + } + skippedPoolCount++; + continue; + } + + float minDist = pools[poolIndex].GetMinDistance(settings.ObjectSpawnMinDistance); + float maxDist = pools[poolIndex].GetMaxDistance(settings.ObjectSpawnMaxDistance); + float currentX = startX + Random.Range(minDist, maxDist); + + int objectsSpawned = 0; + float firstSpawnX = currentX; + + while (currentX <= endX) + { + SpawnFromPool(poolIndex, currentX); + objectsSpawned++; + currentX += Random.Range(minDist, maxDist); + } + + PoolNextSpawnX[poolIndex] = currentX; + spawnedPoolCount++; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] Pool {poolIndex} '{pools[poolIndex].description}': unlockTime={pools[poolIndex].unlockTime}s, prefabs={pools[poolIndex].prefabs.Length}, distance=[{minDist:F1}-{maxDist:F1}], spawned {objectsSpawned} objects from X={firstSpawnX:F2} to X={PoolNextSpawnX[poolIndex]:F2}"); + } + } + + // Ensure all pools with unlockTime <= 0 are marked as unlocked for dynamic spawning + for (int i = 0; i < pools.Length; i++) + { + if (pools[i].unlockTime <= 0f && !UnlockedPoolIndices.Contains(i)) + { + UnlockedPoolIndices.Add(i); + } + } + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[{GetType().Name}] PreSpawnExclusive COMPLETE: {spawnedPoolCount} pools spawned, {skippedPoolCount} pools skipped, {UnlockedPoolIndices.Count} pools unlocked for dynamic spawning"); + } + } + + #endregion + + #region Spawning + + protected void SpawnAtPosition(float xPosition) + { + GameObject prefab = SelectPrefabFromPools(out int poolIndex); + if (prefab != null && poolIndex >= 0) + { + SpawnFromPool(poolIndex, xPosition); + } + } + + /// + /// Spawn a specific prefab from a pool at the given X position. + /// Derived classes must implement this to define spawn behavior. + /// + protected abstract void SpawnFromPool(int poolIndex, float xPosition); + + protected GameObject InstantiatePrefab(GameObject prefab, Vector3 position) + { + GameObject instance = Instantiate(prefab, position, Quaternion.identity); + + if (spawnContainer != null) + { + instance.transform.SetParent(spawnContainer); + } + + return instance; + } + + #endregion + + #region Object Positioning + + /// + /// Position an object based on the specified spawn mode. + /// Delegates to PositioningUtility for all positioning logic. + /// + protected void PositionObject(GameObject obj, float xPosition, SpawnPositionMode mode, + float specifiedY, float randomYMin, float randomYMax) + { + PositioningUtility.PositionObject(obj, xPosition, mode, specifiedY, randomYMin, randomYMax, + settings, settings.ShowDebugLogs); + } + + #endregion + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/BaseDistanceSpawner.cs.meta b/Assets/Scripts/Minigames/Airplane/Core/Spawning/BaseDistanceSpawner.cs.meta new file mode 100644 index 00000000..077fc476 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/BaseDistanceSpawner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f65e211e40b247ffb0ac920be5a9ce53 +timeCreated: 1765993195 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/GroundDistanceSpawner.cs b/Assets/Scripts/Minigames/Airplane/Core/Spawning/GroundDistanceSpawner.cs new file mode 100644 index 00000000..26599ca0 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/GroundDistanceSpawner.cs @@ -0,0 +1,104 @@ +using Core; +using Core.Settings; +using Minigames.Airplane.Data; +using UnityEngine; + +namespace Minigames.Airplane.Core.Spawning +{ + /// + /// Spawns ground tiles at fixed intervals. + /// Inherits distance-based spawning from BaseDistanceSpawner. + /// Uses IAirplaneSettings.GroundSpawnInterval for consistent tile spacing. + /// + public class GroundDistanceSpawner : BaseDistanceSpawner + { + [Header("Ground-Specific")] + [Tooltip("Y position at which to spawn ground tiles")] + [SerializeField] private float groundSpawnY = -18f; + + private float _groundSpawnInterval; + + public override void Initialize(SpawnInitParameters initParams) + { + base.Initialize(initParams); + + // Get fixed ground spawn interval from settings + _groundSpawnInterval = initParams.Settings.GroundSpawnInterval; + + // Force Together mode for ground spawning + poolMode = SpawnPoolMode.Together; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[GroundDistanceSpawner] Using fixed interval: {_groundSpawnInterval}f from settings"); + } + } + + // Override to use fixed intervals instead of random distances + protected override void PreSpawnTogether(float startX, float endX) + { + if (settings.ShowDebugLogs) + { + Logging.Debug($"[GroundDistanceSpawner] PreSpawnTogether START: Range X={startX:F2} to X={endX:F2}, Fixed interval={_groundSpawnInterval:F1}"); + } + + float currentX = startX; + int tilesSpawned = 0; + + while (currentX <= endX) + { + SpawnAtPosition(currentX); + tilesSpawned++; + currentX += _groundSpawnInterval; // FIXED interval, not random + } + + NextSpawnX = currentX; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[GroundDistanceSpawner] PreSpawnTogether COMPLETE: Spawned {tilesSpawned} ground tiles from X={startX:F2} to X={NextSpawnX:F2}"); + } + } + + /// + /// Override SpawnNext to use fixed ground intervals instead of random distances. + /// + public override void UpdateSpawnHorizon(float horizonX) + { + // Keep spawning while next spawn point is behind the horizon + while (NextSpawnX < horizonX) + { + SpawnAtPosition(NextSpawnX); + LastSpawnedX = NextSpawnX; + NextSpawnX += _groundSpawnInterval; // FIXED interval, not random + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[GroundDistanceSpawner] Spawned at {LastSpawnedX:F2}, next at {NextSpawnX:F2}"); + } + } + } + + protected override void SpawnFromPool(int poolIndex, float xPosition) + { + if (poolIndex < 0 || poolIndex >= pools.Length || !pools[poolIndex].HasPrefabs) + return; + + // Select random tile from pool + GameObject tilePrefab = pools[poolIndex].prefabs[Random.Range(0, pools[poolIndex].prefabs.Length)]; + if (tilePrefab == null) return; + + // Calculate spawn position using settings + Vector3 spawnPosition = new Vector3(xPosition, settings.GroundSpawnY, 0f); + + // Instantiate + GameObject instance = InstantiatePrefab(tilePrefab, spawnPosition); + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[GroundDistanceSpawner] Spawned ground tile at X={xPosition:F2}, Y={settings.GroundSpawnY:F2}"); + } + } + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/GroundDistanceSpawner.cs.meta b/Assets/Scripts/Minigames/Airplane/Core/Spawning/GroundDistanceSpawner.cs.meta new file mode 100644 index 00000000..7329e382 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/GroundDistanceSpawner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 76db01f1871c4b9ea66fb981b01b3ee1 +timeCreated: 1765965959 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/ObstacleDistanceSpawner.cs b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ObstacleDistanceSpawner.cs new file mode 100644 index 00000000..265bbca8 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ObstacleDistanceSpawner.cs @@ -0,0 +1,210 @@ +using Core; +using Minigames.Airplane.Data; +using Minigames.Airplane.Interactive; +using System.Collections.Generic; +using UnityEngine; + +namespace Minigames.Airplane.Core.Spawning +{ + /// + /// Spawns obstacle objects (positive and negative) with weighted ratio management. + /// Uses exactly 2 fixed pools: Pool 0 = Positive, Pool 1 = Negative. + /// Inherits distance-based spawning from BaseDistanceSpawner. + /// + public class ObstacleDistanceSpawner : BaseDistanceSpawner + { + private int _positiveSpawnCount; + private int _negativeSpawnCount; + + public override void Initialize(SpawnInitParameters initParams) + { + // TEMPORARY: Unconditional log to verify this is being called + Logging.Debug("[ObstacleDistanceSpawner] Initialize() called - spawner is active!"); + + // Validate exactly 2 pools + if (pools == null || pools.Length != 2) + { + Logging.Error("[ObstacleDistanceSpawner] Must have exactly 2 pools (Positive, Negative)!"); + } + + base.Initialize(initParams); + _positiveSpawnCount = 0; + _negativeSpawnCount = 0; + } + + /// + /// Override base prefab selection to implement positive/negative ratio management. + /// Uses actual spawn counts to maintain target ratio over time. + /// + protected override GameObject SelectPrefabFromPools(out int selectedPoolIndex) + { + selectedPoolIndex = -1; + + // Determine which pool (positive or negative) based on ratio + int targetPoolIndex = DeterminePoolIndexByRatio(); + + if (targetPoolIndex < 0 || targetPoolIndex >= pools.Length || !pools[targetPoolIndex].HasPrefabs) + { + if (settings.ShowDebugLogs) + { + Logging.Warning($"[ObstacleDistanceSpawner] Target pool {targetPoolIndex} has no prefabs!"); + } + return null; + } + + // Get all prefabs from the target pool + List availablePrefabs = new List(); + List prefabWeights = new List(); + + foreach (GameObject prefab in pools[targetPoolIndex].prefabs) + { + if (prefab == null) continue; + + availablePrefabs.Add(prefab); + + // Calculate weight based on recency tracking + float weight = 1f; + if (LastUsedTimes.TryGetValue(prefab, out float lastUsedTime)) + { + float timeSinceUse = GameTime - lastUsedTime; + if (timeSinceUse < settings.RecencyPenaltyDuration) + { + weight = timeSinceUse / settings.RecencyPenaltyDuration; // 0 to 1 linear recovery + } + } + + prefabWeights.Add(weight); + } + + if (availablePrefabs.Count == 0) return null; + + // Select using weighted random (respects recency) + int selectedIndex = WeightedRandom(prefabWeights); + GameObject selectedPrefab = availablePrefabs[selectedIndex]; + selectedPoolIndex = targetPoolIndex; + + // Update recency tracking + LastUsedTimes[selectedPrefab] = GameTime; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ObstacleDistanceSpawner] Selected {(targetPoolIndex == 0 ? "positive" : "negative")} prefab from pool {targetPoolIndex}"); + } + + return selectedPrefab; + } + + /// + /// Determines which pool (positive or negative) to spawn from based on target ratio. + /// Uses actual spawn counts to push toward target ratio over time. + /// + private int DeterminePoolIndexByRatio() + { + int totalSpawned = _positiveSpawnCount + _negativeSpawnCount; + float targetPositiveRatio = settings.PositiveNegativeRatio; + + bool shouldSpawnPositive; + + // First spawn - use ratio as pure probability + if (totalSpawned == 0) + { + shouldSpawnPositive = Random.value < targetPositiveRatio; + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ObstacleDistanceSpawner] First spawn - ratio {targetPositiveRatio:P0} → {(shouldSpawnPositive ? "positive" : "negative")}"); + } + } + else + { + // Calculate current ratio vs target + float currentPositiveRatio = (float)_positiveSpawnCount / totalSpawned; + float difference = targetPositiveRatio - currentPositiveRatio; + + // Adjust probability based on how far we are from target + // If difference > 0: we need more positives, increase positive chance + // If difference < 0: we need more negatives, decrease positive chance + float adjustedProbability = Mathf.Clamp01(targetPositiveRatio + difference); + + shouldSpawnPositive = Random.value < adjustedProbability; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ObstacleDistanceSpawner] Ratio tracking: {_positiveSpawnCount}pos/{_negativeSpawnCount}neg ({currentPositiveRatio:P0} current vs {targetPositiveRatio:P0} target) → adjusted probability {adjustedProbability:P0} → {(shouldSpawnPositive ? "positive" : "negative")}"); + } + } + + return shouldSpawnPositive ? 0 : 1; + } + + protected override void SpawnFromPool(int poolIndex, float xPosition) + { + if (poolIndex < 0 || poolIndex >= 2 || !pools[poolIndex].HasPrefabs) + return; + + // Pool index directly determines positive/negative + // Pool 0 = Positive, Pool 1 = Negative + bool spawnPositive = (poolIndex == 0); + + // Select random prefab from pool + GameObject prefab = pools[poolIndex].prefabs[Random.Range(0, pools[poolIndex].prefabs.Length)]; + if (prefab == null) return; + + // Temporary spawn position (Y will be adjusted by PositionObject) + Vector3 tempPosition = new Vector3(xPosition, 0f, 0f); + + // Instantiate + GameObject instance = InstantiatePrefab(prefab, tempPosition); + + // Try to get spawn entry for positioning (per-prefab override) + var spawnEntry = prefab.GetComponent(); + if (spawnEntry != null) + { + // Use per-prefab configuration + PositionObject(instance, xPosition, spawnEntry.spawnPositionMode, + spawnEntry.specifiedY, spawnEntry.randomYMin, spawnEntry.randomYMax); + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ObstacleDistanceSpawner] Using per-prefab positioning: {spawnEntry.spawnPositionMode}"); + } + } + else + { + // Fall back to global default configuration from settings + PositionObject(instance, xPosition, settings.DefaultObstaclePositionMode, + settings.FallbackYPosition, settings.DefaultObstacleRandomYMin, settings.DefaultObstacleRandomYMax); + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ObstacleDistanceSpawner] Using default positioning from settings: {settings.DefaultObstaclePositionMode}"); + } + } + + // Initialize if implements interface + var initializable = instance.GetComponent(); + if (initializable != null) + { + initializable.Initialize(); + } + + // Track counts + if (spawnPositive) + _positiveSpawnCount++; + else + _negativeSpawnCount++; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ObstacleDistanceSpawner] Spawned {(spawnPositive ? "positive" : "negative")} at X={xPosition:F2} from pool {poolIndex}"); + } + } + + public override void Cleanup() + { + base.Cleanup(); + _positiveSpawnCount = 0; + _negativeSpawnCount = 0; + } + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/ObstacleDistanceSpawner.cs.meta b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ObstacleDistanceSpawner.cs.meta new file mode 100644 index 00000000..93854f40 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ObstacleDistanceSpawner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0a550c256a3d4d91a17adf6d0338f022 +timeCreated: 1765965959 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/ParallaxBackgroundSpawner.cs b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ParallaxBackgroundSpawner.cs new file mode 100644 index 00000000..ffb0b75b --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ParallaxBackgroundSpawner.cs @@ -0,0 +1,220 @@ +using Core; +using Minigames.Airplane.Data; +using Minigames.Airplane.Interactive; +using UnityEngine; + +namespace Minigames.Airplane.Core.Spawning +{ + /// + /// Spawns parallax background elements across 3 fixed layers (Background/Middle/Foreground). + /// Always operates in Exclusive pool mode. + /// Integrates with AirplaneCameraManager to provide camera reference to parallax elements. + /// + public class ParallaxBackgroundSpawner : BaseDistanceSpawner + { + [Header("Parallax-Specific")] + [Tooltip("Sort layer for all parallax elements")] + [SerializeField] private string parallaxSortLayer = "Background"; + + [Tooltip("Sort order for background layer (furthest back)")] + [SerializeField] private int backgroundSortOrder = -50; + + [Tooltip("Sort order increment between layers")] + [SerializeField] private int sortOrderIncrement = 10; + + [Header("Parallax Configuration")] + [Tooltip("Global parallax strength multiplier (0 = no effect, 1 = full effect)")] + [SerializeField] private float globalStrength = 1f; + + [Tooltip("Background layer movement speed (typically slowest, e.g. 0.3)")] + [SerializeField] private float backgroundSpeed = 0.3f; + + [Tooltip("Middle layer movement speed (typically medium, e.g. 0.6)")] + [SerializeField] private float middleSpeed = 0.6f; + + [Tooltip("Foreground layer movement speed (typically fastest, e.g. 0.9)")] + [SerializeField] private float foregroundSpeed = 0.9f; + + [Header("Camera Integration")] + [Tooltip("Camera manager for tracking active camera")] + [SerializeField] private AirplaneCameraManager cameraManager; + + private Transform _currentCameraTransform; + + public override void Initialize(SpawnInitParameters initParams) + { + // Force exclusive mode + poolMode = SpawnPoolMode.Exclusive; + + // Validate exactly 3 pools + if (pools == null || pools.Length != 3) + { + Logging.Error("[ParallaxBackgroundSpawner] Must have exactly 3 pools (Background, Middle, Foreground)!"); + } + + base.Initialize(initParams); + + // Subscribe to camera changes + if (cameraManager != null) + { + cameraManager.OnStateChanged += HandleCameraChanged; + _currentCameraTransform = cameraManager.GetActiveCameraTransform(); + } + else + { + Logging.Warning("[ParallaxBackgroundSpawner] Camera manager not assigned! Parallax elements won't track camera."); + } + } + + private void OnDestroy() + { + if (cameraManager != null) + { + cameraManager.OnStateChanged -= HandleCameraChanged; + } + } + + private void HandleCameraChanged(AirplaneCameraState oldState, AirplaneCameraState newState) + { + if (cameraManager == null) return; + + _currentCameraTransform = cameraManager.GetActiveCameraTransform(); + + // Update all existing parallax elements with new camera + if (spawnContainer != null) + { + foreach (Transform child in spawnContainer) + { + var parallaxElement = child.GetComponent(); + if (parallaxElement != null) + { + parallaxElement.UpdateCamera(_currentCameraTransform); + } + } + } + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ParallaxBackgroundSpawner] Camera changed to {newState}, updated parallax elements"); + } + } + + protected override void SpawnFromPool(int poolIndex, float xPosition) + { + if (poolIndex < 0 || poolIndex >= 3 || !pools[poolIndex].HasPrefabs) + return; + + // Select random prefab from pool + GameObject prefab = pools[poolIndex].prefabs[Random.Range(0, pools[poolIndex].prefabs.Length)]; + if (prefab == null) return; + + // Spawn at temporary position (Y will be adjusted by PositionObject if component exists) + Vector3 spawnPosition = new Vector3(xPosition, 0f, 0f); + + // Instantiate + GameObject instance = InstantiatePrefab(prefab, spawnPosition); + + // Determine parallax layer based on pool index + ParallaxLayer layer = (ParallaxLayer)poolIndex; + + // Get or add ParallaxElement component + ParallaxElement parallaxElement = instance.GetComponent(); + if (parallaxElement == null) + { + parallaxElement = instance.AddComponent(); + } + + // Set sort layer on sprite renderer + SetSortLayer(instance, layer); + + // Log Y position BEFORE positioning + Vector3 positionBeforePositionObject = instance.transform.position; + + // Try to get spawn entry for Y positioning (same logic as obstacles) + var spawnEntry = prefab.GetComponent(); + if (spawnEntry != null) + { + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ParallaxBackgroundSpawner] '{prefab.name}' has PrefabSpawnEntryComponent: mode={spawnEntry.spawnPositionMode}, specifiedY={spawnEntry.specifiedY}, randomRange=[{spawnEntry.randomYMin},{spawnEntry.randomYMax}]"); + } + + // Use per-prefab configuration + PositionObject(instance, xPosition, spawnEntry.spawnPositionMode, + spawnEntry.specifiedY, spawnEntry.randomYMin, spawnEntry.randomYMax); + } + else + { + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ParallaxBackgroundSpawner] '{prefab.name}' NO component, using global: mode={settings.DefaultObstaclePositionMode}"); + } + + // Fall back to global default configuration from settings + PositionObject(instance, xPosition, settings.DefaultObstaclePositionMode, + settings.FallbackYPosition, settings.DefaultObstacleRandomYMin, settings.DefaultObstacleRandomYMax); + } + + // Log Y position AFTER positioning + Vector3 positionAfterPositionObject = instance.transform.position; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ParallaxBackgroundSpawner] Y positioning: BEFORE={positionBeforePositionObject.y:F2}, AFTER={positionAfterPositionObject.y:F2}, CHANGED={positionAfterPositionObject.y != positionBeforePositionObject.y}"); + } + + // IMPORTANT: Initialize parallax element AFTER positioning so it captures the correct Y coordinate + // The parallax element caches _startPosition which includes Y coordinate + // If we initialize before positioning, Y=0 gets cached and objects appear at wrong height + float layerSpeed = GetLayerSpeed(layer); + parallaxElement.Initialize(layer, layerSpeed, globalStrength, _currentCameraTransform); + + // Verify that Initialize didn't move the object + Vector3 positionAfterInitialize = instance.transform.position; + + if (Mathf.Abs(positionAfterInitialize.y - positionAfterPositionObject.y) > 0.01f) + { + Logging.Error($"[ParallaxBackgroundSpawner] BUG: Y position changed during Initialize! Before={positionAfterPositionObject.y:F2}, After={positionAfterInitialize.y:F2}"); + } + + if (settings.ShowDebugLogs) + { + string positionModeInfo = spawnEntry != null + ? $", positionMode={spawnEntry.spawnPositionMode} (per-prefab)" + : $", positionMode={settings.DefaultObstaclePositionMode} (global fallback)"; + Logging.Debug($"[ParallaxBackgroundSpawner] FINAL: '{prefab.name}' at WORLD position X={positionAfterInitialize.x:F2}, Y={positionAfterInitialize.y:F2}, Z={positionAfterInitialize.z:F2}{positionModeInfo}"); + } + } + + private void SetSortLayer(GameObject obj, ParallaxLayer layer) + { + SpriteRenderer spriteRenderer = obj.GetComponentInChildren(); + if (spriteRenderer == null) return; + + // All parallax objects use the same sort layer + spriteRenderer.sortingLayerName = parallaxSortLayer; + + // Calculate sort order based on layer depth + // Background (0): -50, Middle (1): -40, Foreground (2): -30 + int sortOrder = backgroundSortOrder + ((int)layer * sortOrderIncrement); + spriteRenderer.sortingOrder = sortOrder; + + if (settings.ShowDebugLogs) + { + Logging.Debug($"[ParallaxBackgroundSpawner] Set '{parallaxSortLayer}' layer with sort order {sortOrder} for {layer}"); + } + } + + private float GetLayerSpeed(ParallaxLayer layer) + { + return layer switch + { + ParallaxLayer.Background => backgroundSpeed, + ParallaxLayer.Middle => middleSpeed, + ParallaxLayer.Foreground => foregroundSpeed, + _ => 1f + }; + } + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/ParallaxBackgroundSpawner.cs.meta b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ParallaxBackgroundSpawner.cs.meta new file mode 100644 index 00000000..b5b1bbdd --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/ParallaxBackgroundSpawner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b126f2d189024140ac0bc6fb14155c7f +timeCreated: 1765965959 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/PositioningUtility.cs b/Assets/Scripts/Minigames/Airplane/Core/Spawning/PositioningUtility.cs new file mode 100644 index 00000000..2150f36b --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/PositioningUtility.cs @@ -0,0 +1,238 @@ +using Core; +using Core.Settings; +using Minigames.Airplane.Data; +using UnityEngine; + +namespace Minigames.Airplane.Core.Spawning +{ + /// + /// Static utility for object positioning in the airplane minigame. + /// Provides common positioning logic used by spawners and managers. + /// Handles snap-to-ground, specified Y, and random Y positioning. + /// + public static class PositioningUtility + { + /// + /// Position an object based on the specified spawn mode. + /// Handles all positioning modes: SnapToGround, SpecifiedY, and RandomRange. + /// + public static void PositionObject(GameObject obj, float xPosition, SpawnPositionMode mode, + float specifiedY, float randomYMin, float randomYMax, IAirplaneSettings settings, bool showDebugLogs = false) + { + if (obj == null) + { + if (showDebugLogs) + { + Logging.Warning("[PositioningUtility] PositionObject called with null object!"); + } + return; + } + + // First, set an initial Y position based on mode + float initialY; + + switch (mode) + { + case SpawnPositionMode.SnapToGround: + // Start at fallback position, SnapToGround will adjust + initialY = settings.FallbackYPosition; + break; + + case SpawnPositionMode.SpecifiedY: + initialY = specifiedY; + break; + + case SpawnPositionMode.RandomRange: + initialY = Random.Range(randomYMin, randomYMax); + break; + + default: + initialY = 0f; + if (showDebugLogs) + { + Logging.Warning($"[PositioningUtility] Unknown spawn position mode: {mode}"); + } + break; + } + + // Set initial position + obj.transform.position = new Vector3(xPosition, initialY, 0f); + + // For SnapToGround mode, now adjust the object to align with ground + if (mode == SpawnPositionMode.SnapToGround) + { + SnapToGround(obj, xPosition, settings, showDebugLogs); + } + + // Draw debug visualization AFTER positioning + if (showDebugLogs) + { + DrawObjectBoundsDebug(obj, mode); + } + } + + /// + /// Snap an object to the ground using raycast. + /// Positions object so its bottom bounds touch the TOP surface of the ground. + /// Uses simple measure-and-adjust approach that works with any pivot configuration. + /// + public static void SnapToGround(GameObject obj, float xPosition, IAirplaneSettings settings, bool showDebugLogs = false) + { + if (obj == null) + { + if (showDebugLogs) + { + Logging.Warning("[PositioningUtility] SnapToGround called with null object!"); + } + return; + } + + // Raycast from high up to find the TOP of the ground surface + Vector2 rayOrigin = new Vector2(xPosition, settings.MaxGroundRaycastDistance); + int layerMask = 1 << settings.GroundLayer; + RaycastHit2D hit = Physics2D.Raycast(rayOrigin, Vector2.down, settings.MaxGroundRaycastDistance + 100f, layerMask); + + if (hit.collider == null) + { + if (showDebugLogs) + { + Logging.Warning($"[PositioningUtility] SnapToGround FAILED at X={xPosition:F2} - no ground found! Object stays at current Y."); + } + return; // Can't snap, leave object where it is + } + + // Ground surface is at the raycast hit point (TOP of ground collider) + float groundY = hit.point.y; + + // Measure where the object's bottom actually is RIGHT NOW + Bounds bounds = GetObjectBounds(obj); + float currentBottom = bounds.min.y; + + // Calculate how far off we are from desired position + float offset = currentBottom - groundY; + + // Adjust the object's position to align bottom with ground + Vector3 pos = obj.transform.position; + pos.y -= offset; // Move up or down by the difference + obj.transform.position = pos; + + if (showDebugLogs) + { + // Draw raycast (cyan) + Debug.DrawLine(rayOrigin, hit.point, Color.cyan, 5f); + + // Draw ground hit point (magenta) + Debug.DrawLine(new Vector3(xPosition - 1f, groundY, 0f), + new Vector3(xPosition + 1f, groundY, 0f), Color.magenta, 5f); + + // Draw object bottom after snapping (red) + Bounds finalBounds = GetObjectBounds(obj); + Debug.DrawLine(new Vector3(xPosition - 1f, finalBounds.min.y, 0f), + new Vector3(xPosition + 1f, finalBounds.min.y, 0f), Color.red, 5f); + + Logging.Debug($"[PositioningUtility] SnapToGround: X={xPosition:F2}, GroundTop={groundY:F2}, " + + $"BottomWas={currentBottom:F2}, Offset={offset:F2}, FinalY={obj.transform.position.y:F2}"); + } + } + + /// + /// Get the bounds of an object from its Renderer or Collider. + /// Searches child objects if no component is found on the root. + /// + public static Bounds GetObjectBounds(GameObject obj) + { + if (obj == null) + { + return new Bounds(Vector3.zero, Vector3.one); + } + + // Try renderer first (most common for sprites) + Renderer objRenderer = obj.GetComponentInChildren(); + if (objRenderer != null) return objRenderer.bounds; + + // Try 2D collider + Collider2D objCollider2D = obj.GetComponentInChildren(); + if (objCollider2D != null) return objCollider2D.bounds; + + // Try 3D collider + Collider objCollider3D = obj.GetComponentInChildren(); + if (objCollider3D != null) return objCollider3D.bounds; + + // Fallback to transform position with unit size + return new Bounds(obj.transform.position, Vector3.one); + } + + /// + /// Draw debug visualization for object bounds after positioning. + /// Shows the actual bounds in world space at the object's final position. + /// + public static void DrawObjectBoundsDebug(GameObject obj, SpawnPositionMode mode) + { + if (obj == null) return; + + Bounds bounds = default; + string sourceType = "none"; + + // Get bounds from whatever component is available + Renderer objRenderer = obj.GetComponentInChildren(); + if (objRenderer != null) + { + bounds = objRenderer.bounds; + sourceType = "Renderer"; + } + else + { + Collider2D objCollider2D = obj.GetComponentInChildren(); + if (objCollider2D != null) + { + bounds = objCollider2D.bounds; + sourceType = "Collider2D"; + } + else + { + Collider objCollider3D = obj.GetComponentInChildren(); + if (objCollider3D != null) + { + bounds = objCollider3D.bounds; + sourceType = "Collider3D"; + } + } + } + + if (sourceType == "none") return; + + Vector3 center = bounds.center; + Vector3 extents = bounds.extents; + float height = bounds.size.y; + + // Draw bounds box (green) + Debug.DrawLine(new Vector3(center.x - extents.x, center.y - extents.y, center.z), + new Vector3(center.x + extents.x, center.y - extents.y, center.z), Color.green, 5f); + Debug.DrawLine(new Vector3(center.x - extents.x, center.y + extents.y, center.z), + new Vector3(center.x + extents.x, center.y + extents.y, center.z), Color.green, 5f); + Debug.DrawLine(new Vector3(center.x - extents.x, center.y - extents.y, center.z), + new Vector3(center.x - extents.x, center.y + extents.y, center.z), Color.green, 5f); + Debug.DrawLine(new Vector3(center.x + extents.x, center.y - extents.y, center.z), + new Vector3(center.x + extents.x, center.y + extents.y, center.z), Color.green, 5f); + + // Draw center point (yellow cross) + Debug.DrawLine(new Vector3(center.x - 1f, center.y, center.z), + new Vector3(center.x + 1f, center.y, center.z), Color.yellow, 5f); + Debug.DrawLine(new Vector3(center.x, center.y - 1f, center.z), + new Vector3(center.x, center.y + 1f, center.z), Color.yellow, 5f); + + // Draw bottom edge (red thick line) - where we expect the object to touch ground + Debug.DrawLine(new Vector3(center.x - extents.x, center.y - extents.y, center.z), + new Vector3(center.x + extents.x, center.y - extents.y, center.z), Color.red, 5f); + + // Draw top edge (cyan) + Debug.DrawLine(new Vector3(center.x - extents.x, center.y + extents.y, center.z), + new Vector3(center.x + extents.x, center.y + extents.y, center.z), Color.cyan, 5f); + + Logging.Debug($"[PositioningUtility] ObjectBounds: {obj.name}, Mode={mode}, Source={sourceType}, " + + $"Height={height:F2}, Center.y={center.y:F2}, Bottom.y={center.y - extents.y:F2}, " + + $"Top.y={center.y + extents.y:F2}, Scale={obj.transform.localScale.y:F2}"); + } + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Core/Spawning/PositioningUtility.cs.meta b/Assets/Scripts/Minigames/Airplane/Core/Spawning/PositioningUtility.cs.meta new file mode 100644 index 00000000..5287af2b --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Core/Spawning/PositioningUtility.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 369dac4c5d0943329fd0918ea52bdd4b +timeCreated: 1766006091 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Data/ParallaxLayer.cs b/Assets/Scripts/Minigames/Airplane/Data/ParallaxLayer.cs new file mode 100644 index 00000000..7f44515e --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/ParallaxLayer.cs @@ -0,0 +1,24 @@ +namespace Minigames.Airplane.Data +{ + /// + /// Defines parallax layer depth for background elements. + /// + public enum ParallaxLayer + { + /// + /// Furthest back layer, moves slowest (lowest parallax factor). + /// + Background, + + /// + /// Middle layer, moves at medium speed. + /// + Middle, + + /// + /// Closest layer, moves fastest (highest parallax factor). + /// + Foreground + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Data/ParallaxLayer.cs.meta b/Assets/Scripts/Minigames/Airplane/Data/ParallaxLayer.cs.meta new file mode 100644 index 00000000..28f744ec --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/ParallaxLayer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 30cd4bc1743c44089146678153542aae +timeCreated: 1765965854 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Data/PrefabSpawnEntryComponent.cs b/Assets/Scripts/Minigames/Airplane/Data/PrefabSpawnEntryComponent.cs new file mode 100644 index 00000000..f25d9d3c --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/PrefabSpawnEntryComponent.cs @@ -0,0 +1,27 @@ +using Minigames.Airplane.Data; +using UnityEngine; + +namespace Minigames.Airplane.Data +{ + /// + /// Component to store spawn positioning data on prefabs. + /// Attach this to obstacle prefabs that need specific positioning behavior. + /// If not present, spawner will use default positioning from AirplaneSettings. + /// + [AddComponentMenu("Airplane/Prefab Spawn Entry")] + public class PrefabSpawnEntryComponent : MonoBehaviour + { + [Tooltip("How to position this object vertically")] + public SpawnPositionMode spawnPositionMode = SpawnPositionMode.SnapToGround; + + [Tooltip("Y position to use (when mode is SpecifiedY)")] + public float specifiedY; + + [Tooltip("Min Y for random range (when mode is RandomRange)")] + public float randomYMin = -5f; + + [Tooltip("Max Y for random range (when mode is RandomRange)")] + public float randomYMax = 5f; + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Data/PrefabSpawnEntryComponent.cs.meta b/Assets/Scripts/Minigames/Airplane/Data/PrefabSpawnEntryComponent.cs.meta new file mode 100644 index 00000000..89df8434 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/PrefabSpawnEntryComponent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 90239fb003214b4087d0717f6f417161 +timeCreated: 1765990367 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Data/SpawnInitParameters.cs b/Assets/Scripts/Minigames/Airplane/Data/SpawnInitParameters.cs new file mode 100644 index 00000000..1170e188 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/SpawnInitParameters.cs @@ -0,0 +1,32 @@ +using Core.Settings; +using UnityEngine; + +namespace Minigames.Airplane.Data +{ + /// + /// Parameters passed from AirplaneSpawnManager to spawners during initialization. + /// Encapsulates shared references and configuration. + /// + public class SpawnInitParameters + { + /// + /// Parent transform for spawned objects (organization) + /// + public Transform SpawnContainer { get; set; } + + /// + /// Settings reference for spawn configuration + /// + public IAirplaneSettings Settings { get; set; } + + /// + /// Create spawn initialization parameters + /// + public SpawnInitParameters(Transform spawnContainer, IAirplaneSettings settings) + { + SpawnContainer = spawnContainer; + Settings = settings; + } + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Data/SpawnInitParameters.cs.meta b/Assets/Scripts/Minigames/Airplane/Data/SpawnInitParameters.cs.meta new file mode 100644 index 00000000..4a9dfe45 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/SpawnInitParameters.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: eb788e2f6d204a5fb1b2ae79ed38e7c2 +timeCreated: 1765972065 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolConfig.cs b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolConfig.cs new file mode 100644 index 00000000..2995b0a1 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolConfig.cs @@ -0,0 +1,45 @@ +using System; +using UnityEngine; + +namespace Minigames.Airplane.Data +{ + /// + /// Configuration for a single spawn pool. + /// Contains prefabs, unlock timing, and optional spawn parameter overrides. + /// + [Serializable] + public class SpawnPoolConfig + { + [Tooltip("Prefabs that can spawn from this pool")] + public GameObject[] prefabs; + + [Tooltip("Time (seconds from game start) when this pool becomes available. 0 = available immediately.")] + public float unlockTime = 0f; + + [Tooltip("Description for this pool (editor reference only)")] + public string description = "Pool"; + + [Header("Spawn Parameter Overrides (0 = use global)")] + [Tooltip("Override minimum spawn distance for this pool (0 = use global)")] + public float overrideMinDistance = 0f; + + [Tooltip("Override maximum spawn distance for this pool (0 = use global)")] + public float overrideMaxDistance = 0f; + + /// + /// Check if this pool has valid prefabs assigned. + /// + public bool HasPrefabs => prefabs != null && prefabs.Length > 0; + + /// + /// Get effective minimum distance (uses override if non-zero, otherwise uses global). + /// + public float GetMinDistance(float globalMin) => overrideMinDistance > 0f ? overrideMinDistance : globalMin; + + /// + /// Get effective maximum distance (uses override if non-zero, otherwise uses global). + /// + public float GetMaxDistance(float globalMax) => overrideMaxDistance > 0f ? overrideMaxDistance : globalMax; + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolConfig.cs.meta b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolConfig.cs.meta new file mode 100644 index 00000000..db59ad4c --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolConfig.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 51d29acb7cdd48819588acd1401456a9 +timeCreated: 1765965854 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolMode.cs b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolMode.cs new file mode 100644 index 00000000..26bb273f --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolMode.cs @@ -0,0 +1,21 @@ +namespace Minigames.Airplane.Data +{ + /// + /// Defines how multiple spawn pools are combined. + /// + public enum SpawnPoolMode + { + /// + /// All unlocked pools contribute to a single shared spawn stream. + /// Objects spawn at regular intervals considering all available pools. + /// + Together, + + /// + /// Each pool spawns independently with its own timing. + /// Multiple objects can spawn simultaneously from different pools. + /// + Exclusive + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolMode.cs.meta b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolMode.cs.meta new file mode 100644 index 00000000..fd060b97 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Data/SpawnPoolMode.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5206332ad0e54ed4b20df47663202967 +timeCreated: 1765965854 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Interactive/ParallaxElement.cs b/Assets/Scripts/Minigames/Airplane/Interactive/ParallaxElement.cs new file mode 100644 index 00000000..7831ff03 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Interactive/ParallaxElement.cs @@ -0,0 +1,104 @@ +using Core; +using Minigames.Airplane.Data; +using UnityEngine; + +namespace Minigames.Airplane.Interactive +{ + /// + /// Parallax element that adjusts position based on camera movement. + /// Creates depth illusion by moving at different speeds for different layers. + /// Configuration is provided by ParallaxBackgroundSpawner at initialization. + /// IMPORTANT: Always calculates position relative to ORIGINAL spawn position and camera, + /// ensuring deterministic behavior during camera blends and switches. + /// + public class ParallaxElement : MonoBehaviour + { + // Runtime state (set by spawner via Initialize) + private ParallaxLayer _layer; + private float _layerSpeed; + private float _globalStrength; + + // Current camera being tracked + private Transform _cameraTransform; + + // ORIGINAL spawn state - NEVER reset after initialization + // This ensures objects return to spawn position when camera returns to spawn position + private Vector3 _originalSpawnPosition; + private float _originalCameraX; + + private bool _isInitialized; + + private void Update() + { + if (!_isInitialized || _cameraTransform == null) return; + + ApplyParallax(); + } + + /// + /// Initialize the parallax element with spawner-provided settings. + /// Called by ParallaxBackgroundSpawner when spawning. + /// Sets the ORIGINAL spawn position and camera position - these are never reset. + /// IMPORTANT: Uses Camera.main for tracking to ensure smooth updates during Cinemachine blends. + /// + public void Initialize(ParallaxLayer layer, float layerSpeed, float globalStrength, Transform cameraTransform) + { + _layer = layer; + _layerSpeed = layerSpeed; + _globalStrength = globalStrength; + + // ALWAYS use Camera.main for tracking - this ensures smooth updates during Cinemachine blends + // Virtual cameras don't move during blends, but Camera.main does + _cameraTransform = Camera.main != null ? Camera.main.transform : cameraTransform; + + // Store ORIGINAL spawn position - never reset + _originalSpawnPosition = transform.position; + + if (_cameraTransform != null) + { + // Store ORIGINAL camera X - never reset + _originalCameraX = _cameraTransform.position.x; + _isInitialized = true; + } + } + + /// + /// Update the camera transform when camera changes. + /// Called by ParallaxBackgroundSpawner when camera switches or blends. + /// ONLY updates the camera reference - does NOT reset start position or camera X. + /// This ensures parallax remains deterministic across camera switches. + /// IMPORTANT: Always uses Camera.main to ensure smooth updates during blends. + /// + public void UpdateCamera(Transform newCameraTransform) + { + // ALWAYS use Camera.main for tracking - this ensures smooth updates during Cinemachine blends + // We ignore the passed transform and always use Camera.main + Transform mainCamera = Camera.main != null ? Camera.main.transform : newCameraTransform; + + if (mainCamera == null) return; + + // Simply update the camera reference - do NOT reset positions + // The parallax will continue to calculate relative to original spawn state + _cameraTransform = mainCamera; + _isInitialized = true; + } + + private void ApplyParallax() + { + // Calculate camera displacement from ORIGINAL camera position + // This ensures objects return to spawn position when camera returns to spawn position + float cameraDisplacement = _cameraTransform.position.x - _originalCameraX; + + // Calculate parallax offset - negative to move opposite direction + // Lower speed = appears further away (moves less) + // Camera moves right (+) → background moves left (-) at reduced speed + float parallaxOffset = -cameraDisplacement * _layerSpeed * _globalStrength; + + // Apply offset to ORIGINAL spawn position + Vector3 newPosition = _originalSpawnPosition; + newPosition.x += parallaxOffset; + transform.position = newPosition; + } + } +} + diff --git a/Assets/Scripts/Minigames/Airplane/Interactive/ParallaxElement.cs.meta b/Assets/Scripts/Minigames/Airplane/Interactive/ParallaxElement.cs.meta new file mode 100644 index 00000000..0eff2f41 --- /dev/null +++ b/Assets/Scripts/Minigames/Airplane/Interactive/ParallaxElement.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b32c96c5365743d3a1a5c849ba340b6e +timeCreated: 1765965978 \ No newline at end of file diff --git a/Assets/Scripts/Minigames/Airplane/Settings/AirplaneSettings.cs b/Assets/Scripts/Minigames/Airplane/Settings/AirplaneSettings.cs index aa57e44d..6798d655 100644 --- a/Assets/Scripts/Minigames/Airplane/Settings/AirplaneSettings.cs +++ b/Assets/Scripts/Minigames/Airplane/Settings/AirplaneSettings.cs @@ -107,6 +107,9 @@ namespace Minigames.Airplane.Settings [Tooltip("Distance interval for ground tile spawning")] [SerializeField] private float groundSpawnInterval = 5f; + [Tooltip("Time penalty (seconds) applied to recently-spawned prefabs for diversity")] + [SerializeField] private float recencyPenaltyDuration = 10f; + [Header("Ground Snapping")] [Tooltip("Layer for ground detection (objects will snap to this)")] [Layer] @@ -115,8 +118,24 @@ namespace Minigames.Airplane.Settings [Tooltip("Maximum distance to raycast for ground")] [SerializeField] private float maxGroundRaycastDistance = 50f; - [Tooltip("Default Y offset for objects if no ground found")] - [SerializeField] private float defaultObjectYOffset = 0f; + [Tooltip("Fallback Y position (used when SnapToGround fails OR when using SpecifiedY positioning mode)")] + [SerializeField] private float fallbackYPosition = 0f; + + [Tooltip("Y position at which to spawn ground tiles")] + [SerializeField] private float groundSpawnY = -18f; + + [Header("Default Obstacle Positioning")] + [Tooltip("Default mode for obstacle positioning")] + [SerializeField] private Data.SpawnPositionMode defaultObstaclePositionMode = Data.SpawnPositionMode.SnapToGround; + + [Tooltip("Default Y position for obstacles (if specified)")] + [SerializeField] private float defaultObstacleSpecifiedY = -10f; + + [Tooltip("Minimum random Y position for obstacles (if random range used)")] + [SerializeField] private float defaultObstacleRandomYMin = -5; + + [Tooltip("Maximum random Y position for obstacles (if random range used)")] + [SerializeField] private float defaultObstacleRandomYMax = 5; [Header("Debug")] [Tooltip("Show debug logs in console")] @@ -155,9 +174,14 @@ namespace Minigames.Airplane.Settings public float PositiveNegativeRatio => positiveNegativeRatio; public float SpawnDistanceAhead => spawnDistanceAhead; public float GroundSpawnInterval => groundSpawnInterval; + public float RecencyPenaltyDuration => recencyPenaltyDuration; public int GroundLayer => groundLayer; public float MaxGroundRaycastDistance => maxGroundRaycastDistance; - public float DefaultObjectYOffset => defaultObjectYOffset; + public float FallbackYPosition => fallbackYPosition; + public float GroundSpawnY => groundSpawnY; + public Data.SpawnPositionMode DefaultObstaclePositionMode => defaultObstaclePositionMode; + public float DefaultObstacleRandomYMin => defaultObstacleRandomYMin; + public float DefaultObstacleRandomYMax => defaultObstacleRandomYMax; public bool ShowDebugLogs => showDebugLogs; #endregion diff --git a/Assets/Scripts/Minigames/BirdPooper/ScrollingEntity.cs b/Assets/Scripts/Minigames/BirdPooper/ScrollingEntity.cs index e9d043b8..1bd72e49 100644 --- a/Assets/Scripts/Minigames/BirdPooper/ScrollingEntity.cs +++ b/Assets/Scripts/Minigames/BirdPooper/ScrollingEntity.cs @@ -117,8 +117,12 @@ namespace Minigames.BirdPooper /// protected virtual void OnValidate() { + // Skip validation for prefab assets (only run on scene instances) + if (UnityEditor.PrefabUtility.IsPartOfPrefabAsset(this)) + return; + // Only run in editor, not during play mode - if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode) + if (Application.isPlaying || !Application.isEditor) return; EdgeAnchor anchor = GetComponent(); diff --git a/Assets/Settings/AirplaneSettings.asset b/Assets/Settings/AirplaneSettings.asset index c439a976..ebab573f 100644 --- a/Assets/Settings/AirplaneSettings.asset +++ b/Assets/Settings/AirplaneSettings.asset @@ -78,15 +78,23 @@ MonoBehaviour: introDuration: 2 personIntroDuration: 2 evaluationDuration: 2 - dynamicSpawnThresholdMarker: {fileID: 0} - targetMinDistance: 100 + targetFlybyLingerDuration: 1.5 + targetFlybyCameraBlendTime: 1 + preSpawnBeyondTargetDistance: 50 + targetMinDistance: 200 targetMaxDistance: 300 objectSpawnMinDistance: 5 objectSpawnMaxDistance: 30 - positiveNegativeRatio: 0.5 - spawnDistanceAhead: 50 + positiveNegativeRatio: 0.7 + spawnDistanceAhead: 75 groundSpawnInterval: 30 + recencyPenaltyDuration: 10 groundLayer: 14 maxGroundRaycastDistance: 50 - defaultObjectYOffset: -18 - showDebugLogs: 0 + fallbackYPosition: 0 + groundSpawnY: -5 + defaultObstaclePositionMode: 2 + defaultObstacleSpecifiedY: -10 + defaultObstacleRandomYMin: 5 + defaultObstacleRandomYMax: 25 + showDebugLogs: 1