Compare commits

..

10 Commits

Author SHA1 Message Date
Michal Pikulski
b90ab4b0ba FInalize first pass over cement decoration game 2025-11-24 15:54:14 +01:00
Michal Pikulski
e04db31a98 Settings cleaned up, working on dragging etc. 2025-11-24 15:54:14 +01:00
Michal Pikulski
6a41fd3340 Setup scene for the statue nonsense 2025-11-24 15:54:13 +01:00
Michal Pikulski
e9a6f35ef5 cement daddy 2025-11-24 15:54:13 +01:00
Michal Pikulski
e33de5da3d Fix the sound bird interactaiblity issues. 2025-11-24 11:41:47 +01:00
Michal Pikulski
f0abc4760b Hide Ana-Lyse's dialogue component when taking photo, also correctly restore a hidden state with the dialogu turned off 2025-11-24 11:07:46 +01:00
Michal Pikulski
ff28bd23cb Fix up eagle eye's weirdness, add option to auto clear saves 2025-11-24 10:37:40 +01:00
Michal Pikulski
3f847508be Working mulit-slot items 2025-11-21 15:50:06 +01:00
Michal Pikulski
e9320c6d03 Poop obstacle pipeline working 2025-11-21 11:33:49 +01:00
Michal Pikulski
b4b17c18ed Some b ase obstacle and poop spawning 2025-11-21 09:22:06 +01:00
115 changed files with 7830 additions and 1113 deletions

View File

@@ -63,18 +63,6 @@ MonoBehaviour:
m_SerializedLabels:
- BlokkemonCard
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4f4ec75013bc276429c2f4fa52d165e0
m_Address: Assets/Data/Cards/Card_KalkUlation 3.asset
m_ReadOnly: 0
m_SerializedLabels:
- BlokkemonCard
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 53996921ed2094948aa317efe4ca6630
m_Address: Assets/Data/Cards/Card_MormorMarmor 3.asset
m_ReadOnly: 0
m_SerializedLabels:
- BlokkemonCard
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 73d54071304571647b3238a799d9781f
m_Address: Assets/Data/Cards/Card_New Card.asset
m_ReadOnly: 0
@@ -123,12 +111,6 @@ MonoBehaviour:
m_SerializedLabels:
- BlokkemonCard
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: c73a9b19b3208d940b9fae7360287a48
m_Address: Assets/Data/Cards/Card_New Card.asset
m_ReadOnly: 0
m_SerializedLabels:
- BlokkemonCard
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: cd07dfe9285ad414a9b3bd71829b1c41
m_Address: Assets/Data/Cards/Card_New Card.asset
m_ReadOnly: 0

View File

@@ -20,6 +20,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 359004e51663d6442b7d2b960d12b459
m_Address: Settings/StatueDressupSettings
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 35bfcff00faa72c4eb272a9e8288f965
m_Address: Settings/PlayerFollowerSettings
m_ReadOnly: 0

View File

@@ -122,6 +122,32 @@ TextureImporter:
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
@@ -129,10 +155,10 @@ TextureImporter:
name: AEblerup_Map_Statue_0
rect:
serializedVersion: 2
x: 59
y: 48
width: 405
height: 567
x: 0
y: 0
width: 555
height: 676
alignment: 9
pivot: {x: 0.5, y: 0.25}
border: {x: 0, y: 0, z: 0, w: 0}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7091cb36c910f2946b53eb474bb12c0c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 66399ae87653d9b43b7a55fadc15c136
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 1
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: Shoe
decorationName: Shoe
decorationSprite: {fileID: -792204027, guid: f1b529408513adc409a57c9ba7131823, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca949a6208ce5b5488e90ea3e2eed6df
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 2
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: axe
decorationName: axe
decorationSprite: {fileID: 6674386295937086461, guid: 3bd1c178a78fcd144965cd1731dc309b, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5efa934e009bc234e920904b05db3c2f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 3
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: can
decorationName: can
decorationSprite: {fileID: 792078976, guid: f1b529408513adc409a57c9ba7131823, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8819ec8b1f4910a4494755cf043636d1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 4
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: i_feel_the_magic_between_you_and_i
decorationName: I feel the magic between you and I
decorationSprite: {fileID: 1623587888, guid: 1630961e1f25e4243ad74e4e3b0c7e54, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b09b79db8ef15144bb2138ec59f26a9c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 5
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: the_people's_sticker
decorationName: the people's sticker
decorationSprite: {fileID: 3452003437791708593, guid: 4c13556eeb918624c9dd3d7e4086242e, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8838477f768600848813a215ab6a46fe
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 6
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: cardalbum
decorationName: CardAlbum
decorationSprite: {fileID: -4354454609415314374, guid: 1ba1f8cf73f79214190f1432fe1e3bc6, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f0df83df3cff9d84ba9fd4895e5d1b58
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 7
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: chocolate
decorationName: chocolate
decorationSprite: {fileID: -509776585262497855, guid: c648336c825f7d7479582bbe4d95d0bc, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4101d48e428899d409df02f24c83571f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 8
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: tennis_ball
decorationName: tennis ball
decorationSprite: {fileID: -8897872742393391051, guid: 44a64b7a80921694790236bab7765357, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b01ee8334ee052b4784225337e9a5ece
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData 9
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: bird_poop
decorationName: bird poop
decorationSprite: {fileID: 6130942287420046110, guid: 9ef635f111f888a4386a7f0290117264, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a5d493c2c7c9cf74cab038023b401273
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 74c6ae9aa803480c8fb918dd58cfb809, type: 3}
m_Name: TestDecorationData
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.Data.DecorationData
decorationId: backpack
decorationName: backpack
decorationSprite: {fileID: -6415490079858998490, guid: b9d1a045f7c163a4d9e2d38071913885, type: 3}
authoredSize: {x: 300, y: 300}
isUnlocked: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2ea75de9ff6dbfb4b8c246a654868479
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -19,7 +19,9 @@ MonoBehaviour:
requiredOrientation: 1
- sceneName: DivingForPictures
requiredOrientation: 0
- sceneName: BirdB
- sceneName: BirdPoop
requiredOrientation: 1
- sceneName: CardQualityControl
requiredOrientation: 1
- sceneName: StatueDecoration
requiredOrientation: 1

View File

@@ -2,7 +2,6 @@
using UnityEditor;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace AppleHills.Core.Settings.Editor
{
@@ -164,23 +163,31 @@ namespace AppleHills.Core.Settings.Editor
EditorGUILayout.Space(10);
// Draw all properties
SerializedProperty property = serializedObj.GetIterator();
bool enterChildren = true;
while (property.NextVisible(enterChildren))
// Special handling for DebugSettings
if (settings is DebugSettings)
{
enterChildren = false;
// Skip the script field
if (property.name == "m_Script") continue;
// Group headers
if (property.isArray && property.propertyType == SerializedPropertyType.Generic)
DrawDebugSettingsEditor(serializedObj, settings as DebugSettings);
}
else
{
// Draw all properties for other settings types
SerializedProperty property = serializedObj.GetIterator();
bool enterChildren = true;
while (property.NextVisible(enterChildren))
{
EditorGUILayout.LabelField(property.displayName, EditorStyles.boldLabel);
enterChildren = false;
// Skip the script field
if (property.name == "m_Script") continue;
// Group headers
if (property.isArray && property.propertyType == SerializedPropertyType.Generic)
{
EditorGUILayout.LabelField(property.displayName, EditorStyles.boldLabel);
}
EditorGUILayout.PropertyField(property, true);
}
EditorGUILayout.PropertyField(property, true);
}
// Apply changes
@@ -196,6 +203,37 @@ namespace AppleHills.Core.Settings.Editor
}
}
private void DrawDebugSettingsEditor(SerializedObject serializedObj, DebugSettings debugSettings)
{
SerializedProperty property = serializedObj.GetIterator();
bool enterChildren = true;
bool useSaveLoadSystem = debugSettings.UseSaveLoadSystem;
while (property.NextVisible(enterChildren))
{
enterChildren = false;
// Skip the script field
if (property.name == "m_Script") continue;
// Check if this property should be disabled
bool shouldDisable = false;
if (!useSaveLoadSystem)
{
// Disable save-load related options when useSaveLoadSystem is false
if (property.name == "autoClearSaves" || property.name == "dontSaveOnQuit")
{
shouldDisable = true;
}
}
// Disable GUI for dependent fields
EditorGUI.BeginDisabledGroup(shouldDisable);
EditorGUILayout.PropertyField(property, true);
EditorGUI.EndDisabledGroup();
}
}
// Helper method to highlight important fields
private void DrawHighlightedProperty(SerializedProperty property, string tooltip = null)
{

View File

@@ -2,7 +2,6 @@
using UnityEditor;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Core.Settings;
namespace AppleHills.Core.Settings.Editor
@@ -11,7 +10,7 @@ namespace AppleHills.Core.Settings.Editor
{
private Vector2 scrollPosition;
private List<BaseSettings> allSettings = new List<BaseSettings>();
private string[] tabNames = new string[] { "Player & Follower", "Interaction & Items", "Diving Minigame", "Card System", "Card Sorting", "Bird Pooper" };
private string[] tabNames = new string[] { "Player & Follower", "Interaction & Items", "Diving Minigame", "Card System", "Card Sorting", "Bird Pooper", "Statue Dressup" };
private int selectedTab = 0;
private Dictionary<string, SerializedObject> serializedSettingsObjects = new Dictionary<string, SerializedObject>();
private GUIStyle headerStyle;
@@ -52,6 +51,7 @@ namespace AppleHills.Core.Settings.Editor
CreateSettingsIfMissing<CardSystemSettings>("CardSystemSettings");
CreateSettingsIfMissing<CardSortingSettings>("CardSortingSettings");
CreateSettingsIfMissing<BirdPooperSettings>("BirdPooperSettings");
CreateSettingsIfMissing<StatueDressupSettings>("StatueDressupSettings");
}
private void CreateSettingsIfMissing<T>(string fileName) where T : BaseSettings
@@ -127,6 +127,9 @@ namespace AppleHills.Core.Settings.Editor
case 5: // Bird Pooper
DrawSettingsEditor<BirdPooperSettings>();
break;
case 6: // Statue Dressup
DrawSettingsEditor<StatueDressupSettings>();
break;
}
EditorGUILayout.EndScrollView();

View File

@@ -0,0 +1,95 @@
using System.IO;
using UnityEditor;
using UnityEngine;
using AppleHills.Core.Settings;
namespace Editor.Tools
{
/// <summary>
/// Editor script that automatically clears saves before entering play mode
/// if the autoClearSaves setting is enabled in DebugSettings
/// </summary>
[InitializeOnLoad]
public static class AutoClearSavesOnPlay
{
static AutoClearSavesOnPlay()
{
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
}
private static void OnPlayModeStateChanged(PlayModeStateChange state)
{
// Only act when entering play mode (before the scene starts playing)
if (state != PlayModeStateChange.ExitingEditMode)
return;
// Try to load the debug settings
DebugSettings debugSettings = LoadDebugSettings();
if (debugSettings == null)
{
Debug.LogWarning("[AutoClearSaves] Could not find DebugSettings asset. Auto-clear saves disabled.");
return;
}
// Check if auto-clear is enabled
if (!debugSettings.AutoClearSaves)
{
return;
}
// Execute the clear saves logic
ClearSavesFolder();
}
private static DebugSettings LoadDebugSettings()
{
// Try to find the DebugSettings asset in the project
string[] guids = AssetDatabase.FindAssets("t:DebugSettings");
if (guids.Length == 0)
{
return null;
}
// Load the first found DebugSettings asset
string path = AssetDatabase.GUIDToAssetPath(guids[0]);
return AssetDatabase.LoadAssetAtPath<DebugSettings>(path);
}
private static void ClearSavesFolder()
{
// Construct the save folder path (matches SaveLoadManager.DefaultSaveFolder)
string saveFolder = Path.Combine(Application.persistentDataPath, "GameSaves");
if (!Directory.Exists(saveFolder))
{
Debug.Log("[AutoClearSaves] Save folder does not exist, nothing to clear.");
return;
}
try
{
// Delete all files in the save folder
string[] files = Directory.GetFiles(saveFolder);
int deletedCount = 0;
foreach (string file in files)
{
File.Delete(file);
deletedCount++;
}
if (deletedCount > 0)
{
Debug.Log($"[AutoClearSaves] Automatically deleted {deletedCount} save file(s) before entering play mode");
}
}
catch (System.Exception ex)
{
Debug.LogError($"[AutoClearSaves] Failed to auto-clear saves: {ex}");
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c3ba01f7bb704c17bc4f22fd726f7fee
timeCreated: 1763974355

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,195 @@
fileFormatVersion: 2
guid: 9ef635f111f888a4386a7f0290117264
TextureImporter:
internalIDToNameTable:
- first:
213: 6130942287420046110
second: bird_poop_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: iOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: bird_poop_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 386
height: 371
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: e1bb71cf68b751550800000000000000
internalID: 6130942287420046110
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
bird_poop_0: 6130942287420046110
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,195 @@
fileFormatVersion: 2
guid: 77b22fe548c7b264a8c6d243bd1d62ad
TextureImporter:
internalIDToNameTable:
- first:
213: -6300450527438492720
second: camera_icon_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: iOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: camera_icon_0
rect:
serializedVersion: 2
x: 19
y: 68
width: 474
height: 377
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 0db2b1360ad4098a0800000000000000
internalID: -6300450527438492720
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
camera_icon_0: -6300450527438492720
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1,195 @@
fileFormatVersion: 2
guid: 338c4323de4ff7f4c99e4c10a744e914
TextureImporter:
internalIDToNameTable:
- first:
213: -7424888634701936452
second: statue_outline_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: iOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: WindowsStoreApps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: statue_outline_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 555
height: 676
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: cb881cf102f75f890800000000000000
internalID: -7424888634701936452
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: a4e62b13d7f4aeb42a7c302cf33555e9
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
statue_outline_0: -7424888634701936452
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -262,7 +262,7 @@ MonoBehaviour:
m_Calls: []
itemData: {fileID: 11400000, guid: aaf36cd26cf74334e9c7db6c1b03b3fb, type: 2}
iconRenderer: {fileID: 6258593095132504700}
slottedItemRenderer: {fileID: 4110666412151536905}
slottedItemRenderers: []
onItemSlotted:
m_PersistentCalls:
m_Calls: []

View File

@@ -1170,7 +1170,7 @@ MonoBehaviour:
m_Calls: []
itemData: {fileID: 11400000, guid: f97b9e24d6dceb145b56426c1152ebeb, type: 2}
iconRenderer: {fileID: 2343214996212089369}
slottedItemRenderer: {fileID: 7990414055343410434}
slottedItemRenderers: []
onItemSlotted:
m_PersistentCalls:
m_Calls: []

View File

@@ -348,7 +348,7 @@ MonoBehaviour:
m_Calls: []
itemData: {fileID: 11400000, guid: c68dea945fecbf44094359769db04f31, type: 2}
iconRenderer: {fileID: 2825253017896168654}
slottedItemRenderer: {fileID: 3806274462998212361}
slottedItemRenderers: []
onItemSlotted:
m_PersistentCalls:
m_Calls: []

View File

@@ -9,7 +9,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1702819536151974707}
m_Layer: 10
m_Layer: 0
m_Name: AnnaLiseSpotSong
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -41,13 +41,11 @@ GameObject:
m_Component:
- component: {fileID: 2523333015159032981}
- component: {fileID: 8875860401447896107}
- component: {fileID: 5057760771402457000}
- component: {fileID: 2433130051631076285}
- component: {fileID: 7290110366808972859}
- component: {fileID: 9196152289301358918}
- component: {fileID: 2596311128101197840}
m_Layer: 10
m_Name: SoundBird_Slot
- component: {fileID: 7004860270194965002}
m_Layer: 0
m_Name: SoundBird
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -68,6 +66,7 @@ Transform:
m_Children:
- {fileID: 3907351184805552114}
- {fileID: 1702819536151974707}
- {fileID: 2513116580733004004}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8875860401447896107
@@ -128,109 +127,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!61 &5057760771402457000
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 588897581313790951}
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: 1.2}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1.86, y: 3.25}
newSize: {x: 2.21, y: 3.91}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 3.5, y: 4.5}
m_EdgeRadius: 0
--- !u!114 &2433130051631076285
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 588897581313790951}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec1a2e6e32f746c4990c579e13b79104, type: 3}
m_Name:
m_EditorClassIdentifier:
isOneTime: 0
cooldown: -1
characterToInteract: 2
interactionStarted:
m_PersistentCalls:
m_Calls: []
interactionInterrupted:
m_PersistentCalls:
m_Calls: []
characterArrived:
m_PersistentCalls:
m_Calls: []
interactionComplete:
m_PersistentCalls:
m_Calls: []
itemData: {fileID: 11400000, guid: d28f5774afad9d14f823601707150700, type: 2}
iconRenderer: {fileID: 8875860401447896107}
slottedItemRenderer: {fileID: 6941190210788968874}
onItemSlotted:
m_PersistentCalls:
m_Calls: []
onItemSlotRemoved:
m_PersistentCalls:
m_Calls: []
onCorrectItemSlotted:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: AnneLiseBehaviour, AppleHillsScripts
m_MethodName: GotoSpot
m_Mode: 2
m_Arguments:
m_ObjectArgument: {fileID: 588897581313790951}
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
onIncorrectItemSlotted:
m_PersistentCalls:
m_Calls: []
onForbiddenItemSlotted:
m_PersistentCalls:
m_Calls: []
--- !u!114 &7290110366808972859
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -267,7 +163,7 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!114 &2596311128101197840
--- !u!114 &7004860270194965002
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -276,9 +172,10 @@ MonoBehaviour:
m_GameObject: {fileID: 588897581313790951}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 95e46aacea5b42888ee7881894193c11, type: 3}
m_Script: {fileID: 11500000, guid: cfd3b894d78129b4aa5310e5ce9cceae, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Core.SaveLoad.AppleState
m_EditorClassIdentifier: AppleHillsScripts::StateMachines.Quarry.SoundBird.IdleState
itemSlot: {fileID: 0}
--- !u!1 &4624889622840393752
GameObject:
m_ObjectHideFlags: 0
@@ -304,13 +201,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4624889622840393752}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.28, y: 0.57, z: 0}
m_LocalScale: {x: 0.6666667, y: 0.6666667, z: 0.6666667}
m_LocalRotation: {x: 0, y: 0, z: -0.075422555, w: 0.9971517}
m_LocalPosition: {x: -0.27, y: 2.37, z: 0}
m_LocalScale: {x: 0.336075, y: 0.336075, z: 0.336075}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2523333015159032981}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -8.651}
--- !u!212 &6941190210788968874
SpriteRenderer:
m_ObjectHideFlags: 0
@@ -369,3 +266,97 @@ SpriteRenderer:
m_WasSpriteAssigned: 0
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &6117389795918759898
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2513116580733004004}
m_Layer: 0
m_Name: AnimContainer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2513116580733004004
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6117389795918759898}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.13, y: 3.48, z: 0}
m_LocalScale: {x: 0.33, y: 0.33, z: 0.33}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 5133773671673172183}
m_Father: {fileID: 2523333015159032981}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &814760252274833115
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2513116580733004004}
m_Modifications:
- target: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_Name
value: NextStepIndicator
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
--- !u!4 &5133773671673172183 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
m_PrefabInstance: {fileID: 814760252274833115}
m_PrefabAsset: {fileID: 0}

View File

@@ -802,7 +802,7 @@ MonoBehaviour:
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_TargetGraphic: {fileID: 4189849640380816173}
m_OnClick:
m_PersistentCalls:
m_Calls:
@@ -1459,6 +1459,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 2474710976069581060}
m_Modifications:
- target: {fileID: 823686888810001266, guid: 428a0feafda9d6d4e87ecf43ad41dc20, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5445689290567702089, guid: 428a0feafda9d6d4e87ecf43ad41dc20, type: 3}
propertyPath: m_Pivot.x
value: 1

View File

@@ -0,0 +1,180 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5552423787977869117
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1501260903740545620}
- component: {fileID: 4535520683689111684}
- component: {fileID: 3364890105999893377}
- component: {fileID: 134329718604943685}
- component: {fileID: 4086097097060867018}
m_Layer: 0
m_Name: Poop
m_TagString: Projectile
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1501260903740545620
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5552423787977869117}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -11.18, y: -1.97, z: 0}
m_LocalScale: {x: 0.43, y: 0.43, z: 0.43}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4535520683689111684
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5552423787977869117}
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_Sprite: {fileID: 6130942287420046110, guid: 9ef635f111f888a4386a7f0290117264, 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.86, y: 3.71}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!50 &3364890105999893377
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5552423787977869117}
m_BodyType: 1
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!61 &134329718604943685
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5552423787977869117}
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: 1
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: 3.86, y: 3.71}
newSize: {x: 3.86, y: 3.71}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 3.86, y: 3.71}
m_EdgeRadius: 0
--- !u!114 &4086097097060867018
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5552423787977869117}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f2c53b7e2a0042efa4c6679b992b6b6c, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Minigames.BirdPooper.PoopProjectile

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 066f9990a9b1f5547b387633d5d204c0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dbcdce294136cfa4aa1091cf3ff03bcf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,217 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3536052400313117972
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2159841359414636212}
- component: {fileID: 4795053012425497095}
m_Layer: 0
m_Name: Visual
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2159841359414636212
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3536052400313117972}
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: 6842023794578555096}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4795053012425497095
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3536052400313117972}
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_Sprite: {fileID: 2133529702, guid: 99d4c3083e9c24142bc20deaeaf95720, 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.56, y: 4.94}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &8373178063207716143
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6842023794578555096}
- component: {fileID: 1509565078017969516}
- component: {fileID: 11467650667563993}
- component: {fileID: 8135420306913345847}
m_Layer: 0
m_Name: Target
m_TagString: Target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6842023794578555096
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8373178063207716143}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 7.27167, y: -14.259, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2159841359414636212}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &1509565078017969516
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8373178063207716143}
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.10432935, y: 1.5258197}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 2.773602, y: 4.729781}
m_EdgeRadius: 0
--- !u!114 &11467650667563993
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8373178063207716143}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ed380d10e1e04ae7990e5c726c929063, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::AppleHillsCamera.EdgeAnchor
referenceMarker: {fileID: 0}
cameraAdapter: {fileID: 0}
anchorEdge: 2
useReferenceMargin: 0
customMargin: 0
adjustOnStart: 1
adjustOnScreenResize: 1
preserveOtherAxes: 1
accountForObjectSize: 1
customAnchorPoint: {fileID: 0}
showVisualization: 1
visualizationColor: {r: 1, g: 0, b: 0, a: 0.8}
showObjectBounds: 1
debugMode: 0
--- !u!114 &8135420306913345847
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8373178063207716143}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5331a770bc634a738b82f9450441de12, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Minigames.BirdPooper.Target
verticalAnchor: 2
spriteRenderer: {fileID: 4795053012425497095}
hitColor: {r: 1, g: 0, b: 0, a: 1}
onTargetHit:
m_PersistentCalls:
m_Calls: []

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 020f7494c613b06479ccad2c4cedde0f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c0a3bd5d30f50c743805d7e24943255a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,105 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &769974252937479200
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7351787172634191403}
- component: {fileID: 7495592582591578536}
- component: {fileID: 597267714783345863}
- component: {fileID: 3617977973382190563}
- component: {fileID: 8998709565229564215}
m_Layer: 5
m_Name: DecorationDraggableInstance
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7351787172634191403
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7495592582591578536
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_CullTransparentMesh: 1
--- !u!114 &597267714783345863
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!225 &3617977973382190563
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &8998709565229564215
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e4659fd035c74a79af0311de9e17f44a, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.DragDrop.DecorationDraggableInstance
decorationImage: {fileID: 597267714783345863}
canvasGroup: {fileID: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 064cd4d021ea13e47860a59bbe8224aa
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,105 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &769974252937479200
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7351787172634191403}
- component: {fileID: 7495592582591578536}
- component: {fileID: 597267714783345863}
- component: {fileID: 3617977973382190563}
- component: {fileID: 2222137027263565689}
m_Layer: 5
m_Name: DecorationGridIcon
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7351787172634191403
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7495592582591578536
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_CullTransparentMesh: 1
--- !u!114 &597267714783345863
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!225 &3617977973382190563
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!114 &2222137027263565689
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 769974252937479200}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9c806d80a321498c9f33f13d7a31065c, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Minigames.StatueDressup.DragDrop.DecorationGridIcon
iconImage: {fileID: 597267714783345863}
decorationData: {fileID: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a461d4cb94a8ab1429388c90bbd543b6
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -226,7 +226,7 @@ GameObject:
- component: {fileID: 2741639361616064442}
- component: {fileID: 4903273501345439385}
- component: {fileID: 1054459649399154791}
- component: {fileID: 7319925080429004531}
- component: {fileID: 61210891595976786}
m_Layer: 10
m_Name: Hidden
m_TagString: Untagged
@@ -451,7 +451,7 @@ MonoBehaviour:
audioSource: {fileID: 0}
clipPriority: 0
sourcePriority: 1
--- !u!114 &7319925080429004531
--- !u!114 &61210891595976786
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -460,9 +460,9 @@ MonoBehaviour:
m_GameObject: {fileID: 1011363502278351410}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 95e46aacea5b42888ee7881894193c11, type: 3}
m_Script: {fileID: 11500000, guid: 1fa347bfb45f473f8639842928f8cfa1, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Core.SaveLoad.AppleState
m_EditorClassIdentifier: AppleHillsScripts::StateMachines.Quarry.AnneLise.HiddenState
--- !u!1 &1674229500073894281
GameObject:
m_ObjectHideFlags: 0
@@ -830,6 +830,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 603ecc4a6ab6bb84c8cb9773fa310b69, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
dialogueCanvas: {fileID: 7042752134100908030}
--- !u!114 &1193493154550576580
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1740,3 +1741,8 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 3484825090253933040, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 4289827099693551234}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7042752134100908030 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6499933157207406972, guid: a8b0a1c6cf21352439dc24d3b03182db, type: 3}
m_PrefabInstance: {fileID: 4289827099693551234}
m_PrefabAsset: {fileID: 0}

File diff suppressed because one or more lines are too long

View File

@@ -432118,72 +432118,10 @@ Transform:
m_CorrespondingSourceObject: {fileID: 9067462609398217044, guid: 6cbcaf4eb20e63e4fb462f6fb1ada3a7, type: 3}
m_PrefabInstance: {fileID: 286519576}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &287904381
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 726450010}
m_Modifications:
- target: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_Name
value: NextStepIndicator
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
--- !u!4 &287904382 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5507990123417429516, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
m_PrefabInstance: {fileID: 287904381}
m_PrefabAsset: {fileID: 0}
--- !u!1 &287904383 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
m_PrefabInstance: {fileID: 287904381}
m_CorrespondingSourceObject: {fileID: 4754571837807058846, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
m_PrefabInstance: {fileID: 1399567329}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &289703776
PrefabInstance:
@@ -442023,38 +441961,6 @@ MonoBehaviour:
audioSource: {fileID: 0}
clipPriority: 0
sourcePriority: 0
--- !u!1 &726450009
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 726450010}
m_Layer: 0
m_Name: AnimContainer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &726450010
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726450009}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.13, y: 3.48, z: 0}
m_LocalScale: {x: 0.33, y: 0.33, z: 0.33}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 287904382}
m_Father: {fileID: 1399567330}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &733706664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6078012632802010276, guid: 3346526f3046f424196615241a307104, type: 3}
@@ -450296,7 +450202,7 @@ GameObject:
- component: {fileID: 1137411215}
m_Layer: 0
m_Name: CinemachineCamera
m_TagString: Untagged
m_TagString: MainCinemachineCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -452521,7 +452427,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1252594309
Transform:
m_ObjectHideFlags: 0
@@ -455783,74 +455689,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 368957768}
m_Modifications:
- target: {fileID: 22512726373136855, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 588897581313790951, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_Name
value: SoundBird_Slot
objectReference: {fileID: 0}
- target: {fileID: 588897581313790951, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 588897581313790951, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 6
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
objectReference: {fileID: 2078227529}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: birdCanHear
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName
value: TakePhoto
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: soundBird_CanFly, AppleHillsScripts
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName
value: StateMachines.Quarry.AnneLise.AnneLiseBushBehaviour, AppleHillsScripts
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgument
value:
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 2523333015159032981, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalPosition.x
value: 0.04
@@ -455891,54 +455733,13 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalScale.x
value: 0.336075
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalScale.y
value: 0.336075
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalScale.z
value: 0.336075
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalPosition.x
value: -0.27
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalPosition.y
value: 2.37
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9971517
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalRotation.z
value: -0.075422555
objectReference: {fileID: 0}
- target: {fileID: 3907351184805552114, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -8.651
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 2433130051631076285, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
- {fileID: 5057760771402457000, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
- target: {fileID: 7004860270194965002, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
propertyPath: itemSlot
value:
objectReference: {fileID: 1923065567}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 2523333015159032981, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
insertIndex: -1
addedObject: {fileID: 726450010}
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9ad58c5e86338824db8a6daebdb432b5, type: 3}
--- !u!4 &1399567330 stripped
@@ -465965,7 +465766,8 @@ MonoBehaviour:
m_Calls: []
itemData: {fileID: 11400000, guid: d28f5774afad9d14f823601707150700, type: 2}
iconRenderer: {fileID: 1399567344}
slottedItemRenderer: {fileID: 1707349194}
slottedItemRenderers:
- {fileID: 1707349194}
onItemSlotted:
m_PersistentCalls:
m_Calls: []
@@ -471861,6 +471663,14 @@ PrefabInstance:
propertyPath: bushAnimator
value:
objectReference: {fileID: 1476225951}
- target: {fileID: 3093816592344978065, guid: 3346526f3046f424196615241a307104, type: 3}
propertyPath: slottedItemRenderers.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3093816592344978065, guid: 3346526f3046f424196615241a307104, type: 3}
propertyPath: 'slottedItemRenderers.Array.data[0]'
value:
objectReference: {fileID: 3708074769586677214}
- target: {fileID: 3093816592344978065, guid: 3346526f3046f424196615241a307104, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
@@ -471939,6 +471749,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 95e46aacea5b42888ee7881894193c11, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Core.SaveLoad.AppleState
--- !u!212 &3708074769586677214 stripped
SpriteRenderer:
m_CorrespondingSourceObject: {fileID: 7990414055343410434, guid: 3346526f3046f424196615241a307104, type: 3}
m_PrefabInstance: {fileID: 3708074769586677211}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3917799031583628180
PrefabInstance:
m_ObjectHideFlags: 0
@@ -472016,6 +471831,14 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 1007550749}
m_Modifications:
- target: {fileID: 106497079666291966, guid: df01157608cce6447b7ccde0bfa290e1, type: 3}
propertyPath: slottedItemRenderers.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 106497079666291966, guid: df01157608cce6447b7ccde0bfa290e1, type: 3}
propertyPath: 'slottedItemRenderers.Array.data[0]'
value:
objectReference: {fileID: 3978117984697153446}
- target: {fileID: 106497079666291966, guid: df01157608cce6447b7ccde0bfa290e1, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
@@ -472081,6 +471904,11 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: df01157608cce6447b7ccde0bfa290e1, type: 3}
--- !u!212 &3978117984697153446 stripped
SpriteRenderer:
m_CorrespondingSourceObject: {fileID: 3806274462998212361, guid: df01157608cce6447b7ccde0bfa290e1, type: 3}
m_PrefabInstance: {fileID: 3978117984697153445}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4596770314561390347
PrefabInstance:
m_ObjectHideFlags: 0
@@ -472839,6 +472667,22 @@ PrefabInstance:
propertyPath: playerToPlaceDistance
value: 30
objectReference: {fileID: 0}
- target: {fileID: 4110666412151536905, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: m_Size.x
value: 5.75
objectReference: {fileID: 0}
- target: {fileID: 4110666412151536905, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: m_Size.y
value: 2.78
objectReference: {fileID: 0}
- target: {fileID: 4110666412151536905, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 0}
- target: {fileID: 4110666412151536905, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: m_WasSpriteAssigned
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5375394469162727687, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: m_LocalPosition.x
value: 5.28
@@ -472911,6 +472755,18 @@ PrefabInstance:
propertyPath: m_Name
value: LureSpotA_Slot
objectReference: {fileID: 0}
- target: {fileID: 8578055200319571631, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: iconRenderer
value:
objectReference: {fileID: 8013274907828598646}
- target: {fileID: 8578055200319571631, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: slottedItemRenderers.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8578055200319571631, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: 'slottedItemRenderers.Array.data[0]'
value:
objectReference: {fileID: 8013274907828598645}
- target: {fileID: 8578055200319571631, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
propertyPath: onCorrectItemSlotted.m_PersistentCalls.m_Calls.Array.size
value: 2
@@ -472965,6 +472821,16 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2045549771447434109, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
m_PrefabInstance: {fileID: 8013274907828598643}
m_PrefabAsset: {fileID: 0}
--- !u!212 &8013274907828598645 stripped
SpriteRenderer:
m_CorrespondingSourceObject: {fileID: 4110666412151536905, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
m_PrefabInstance: {fileID: 8013274907828598643}
m_PrefabAsset: {fileID: 0}
--- !u!212 &8013274907828598646 stripped
SpriteRenderer:
m_CorrespondingSourceObject: {fileID: 6258593095132504700, guid: 3144c6bbac26fbd49a1608152821cc5f, type: 3}
m_PrefabInstance: {fileID: 8013274907828598643}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8058740013708592448
PrefabInstance:
m_ObjectHideFlags: 0

View File

@@ -306,7 +306,9 @@ MonoBehaviour:
m_EditorClassIdentifier: AppleHillsScripts::Minigames.BirdPooper.BirdPooperGameManager
player: {fileID: 941621859}
obstacleSpawner: {fileID: 938885957}
targetSpawner: {fileID: 1838778561}
gameOverScreen: {fileID: 81231374}
poopPrefab: {fileID: 5552423787977869117, guid: 066f9990a9b1f5547b387633d5d204c0, type: 3}
--- !u!4 &128829408
Transform:
m_ObjectHideFlags: 0
@@ -681,12 +683,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 690060017}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 30.01, y: 0, z: 0}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 33.56759, y: 1.13668, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 938885956}
m_Father: {fileID: 1498486831}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &938473625
GameObject:
@@ -712,12 +714,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938473625}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -30.12, y: 0, z: 0}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -26.56241, y: 1.13668, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 938885956}
m_Father: {fileID: 1498486831}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &938885955
GameObject:
@@ -744,14 +746,12 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 938885955}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 3.55759, y: 1.13668, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 690060018}
- {fileID: 938473626}
m_Father: {fileID: 0}
m_Children: []
m_Father: {fileID: 1498486831}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &938885957
MonoBehaviour:
@@ -774,18 +774,10 @@ MonoBehaviour:
- {fileID: 5356906417396349863, guid: cc2a11f7e5edd7640921d1db442a7224, type: 3}
- {fileID: 1771686652490758453, guid: c2dcfdcc678ff3248b40d189f46a4d3b, type: 3}
- {fileID: 2166804132462075410, guid: c60915cb9b989c04caf075ed31cb2a53, type: 3}
- {fileID: 8872570883018587233, guid: ef4923a2e60ffa540b99d955668c9491, type: 3}
- {fileID: 6378685721593782219, guid: 6b5e79bd10362854e96e56400a25794d, type: 3}
- {fileID: 5221014930798827916, guid: c0d26b0d29c2d5a41a60dc01f80bd500, type: 3}
- {fileID: 9077746715280142631, guid: 830960246de8eec4d9535097ce3653db, type: 3}
- {fileID: 7335086015568222999, guid: 06674917a922d6c48a2d0ac0f6056e01, type: 3}
- {fileID: 8558432647259683993, guid: 8c71dd9ad06dafc41a3308f566726ac5, type: 3}
- {fileID: 461075067585331030, guid: 6a77320ba6ef47f448aa934a22bf396f, type: 3}
- {fileID: 552236068384934285, guid: a9a0c00b5622246429ebd7eaa351d175, type: 3}
- {fileID: 2022439803908362932, guid: 75f3874bd8cb48f4c8c7ff4452ec1c5f, type: 3}
- {fileID: 1526963434598685192, guid: 1a8e2dd4ee8bcab44850e0e63f14777d, type: 3}
- {fileID: 539450891493405750, guid: 700d5f9584069e940baa7107695d2788, type: 3}
- {fileID: 8553623782462946796, guid: de509c8e31091fc469f238050ff49c20, type: 3}
--- !u!1 &941621855
GameObject:
m_ObjectHideFlags: 0
@@ -796,12 +788,12 @@ GameObject:
m_Component:
- component: {fileID: 941621856}
- component: {fileID: 941621858}
- component: {fileID: 941621857}
- component: {fileID: 941621859}
- component: {fileID: 941621860}
- component: {fileID: 941621861}
m_Layer: 0
m_Name: Bird
m_TagString: Untagged
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -822,52 +814,6 @@ Transform:
- {fileID: 989743355}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &941621857
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 941621855}
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: 1
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0.10795927, y: 0.15422785}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 3.1489096, y: 3.1797535}
m_EdgeRadius: 0
--- !u!50 &941621858
Rigidbody2D:
serializedVersion: 5
@@ -939,6 +885,83 @@ MonoBehaviour:
visualizationColor: {r: 1, g: 0, b: 0, a: 0.8}
showObjectBounds: 1
debugMode: 0
--- !u!60 &941621861
PolygonCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 941621855}
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: 1
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, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 1.1532116, y: 0.58190906}
- {x: 1.4644184, y: 0.5569483}
- {x: 1.4214172, y: 0.31169766}
- {x: 1.6079073, y: 0.28156418}
- {x: 1.8019552, y: 0.67698365}
- {x: 1.8297558, y: 1.323832}
- {x: 1.654233, y: 1.3764026}
- {x: 1.5695343, y: 1.1152095}
- {x: 0.92802143, y: 1.1187038}
- {x: 0.7329979, y: 1.503772}
- {x: 0.46102428, y: 1.5575173}
- {x: 0.085243225, y: 1.2721097}
- {x: -0.123518944, y: 1.4144537}
- {x: -0.55174446, y: 1.6402422}
- {x: -0.64256763, y: 1.5012914}
- {x: -0.6007347, y: 1.0087695}
- {x: -0.7314367, y: 0.7691624}
- {x: -0.92963314, y: 0.907363}
- {x: -1.0350323, y: 0.77632636}
- {x: -0.7913971, y: 0.43193945}
- {x: -1.1180935, y: 0.46667978}
- {x: -1.1118784, y: 0.20180213}
- {x: -0.65509033, y: 0.111432254}
- {x: -0.5556206, y: -0.24077833}
- {x: -0.1923418, y: -0.6376203}
- {x: 0.0838753, y: -0.5945872}
- {x: 0.32236862, y: -0.4514704}
- {x: 0.4662609, y: -0.059037298}
- {x: 0.802371, y: 0.12178908}
- {x: 0.9939432, y: 0.33046013}
m_UseDelaunayMesh: 0
--- !u!1 &989743352
GameObject:
m_ObjectHideFlags: 0
@@ -1094,14 +1117,160 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 1122850720}
m_Father: {fileID: 1536057440}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1122850719
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1122850720}
- component: {fileID: 1122850723}
- component: {fileID: 1122850722}
- component: {fileID: 1122850721}
- component: {fileID: 1122850724}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1122850720
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1122850719}
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: 1088771378}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -91, y: 63}
m_SizeDelta: {x: 300, y: 300}
m_Pivot: {x: 1, y: 0}
--- !u!114 &1122850721
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1122850719}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1122850722}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 128829407}
m_TargetAssemblyTypeName: Minigames.BirdPooper.BirdPooperGameManager, AppleHillsScripts
m_MethodName: SpawnPoop
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 1
--- !u!114 &1122850722
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1122850719}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 6130942287420046110, guid: 9ef635f111f888a4386a7f0290117264, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1122850723
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1122850719}
m_CullTransparentMesh: 1
--- !u!114 &1122850724
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1122850719}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 494d0aedce9744308499355006071138, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.DummyInput
--- !u!1 &1143700528
GameObject:
m_ObjectHideFlags: 0
@@ -1155,6 +1324,41 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1498486830
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1498486831}
m_Layer: 0
m_Name: Spawners
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1498486831
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1498486830}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.55759, y: -1.13668, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 938885956}
- {fileID: 1838778560}
- {fileID: 690060018}
- {fileID: 938473626}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1536057436
GameObject:
m_ObjectHideFlags: 0
@@ -1428,6 +1632,56 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1838778559
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1838778560}
- component: {fileID: 1838778561}
m_Layer: 0
m_Name: TargetSpawner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1838778560
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1838778559}
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: 1498486831}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1838778561
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1838778559}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 16beae843b5f431f9256a56aab02b53d, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Minigames.BirdPooper.TargetSpawner
spawnPoint: {fileID: 690060018}
despawnPoint: {fileID: 938473626}
referenceMarker: {fileID: 1143700529}
cameraAdapter: {fileID: 2103114179}
targetPrefabs:
- {fileID: 8373178063207716143, guid: 020f7494c613b06479ccad2c4cedde0f, type: 3}
--- !u!1 &2103114174
GameObject:
m_ObjectHideFlags: 0
@@ -1528,6 +1782,6 @@ SceneRoots:
- {fileID: 580848255}
- {fileID: 941621856}
- {fileID: 1143700530}
- {fileID: 938885956}
- {fileID: 1498486831}
- {fileID: 1536057440}
- {fileID: 128829408}

File diff suppressed because it is too large Load Diff

View File

@@ -172,6 +172,7 @@ namespace Core
var cardSystemSettings = SettingsProvider.Instance.LoadSettingsSynchronous<CardSystemSettings>();
var sortingGameSettings = SettingsProvider.Instance.LoadSettingsSynchronous<CardSortingSettings>();
var birdPooperSettings = SettingsProvider.Instance.LoadSettingsSynchronous<BirdPooperSettings>();
var statueDressupSettings = SettingsProvider.Instance.LoadSettingsSynchronous<StatueDressupSettings>();
// Register settings with service locator
if (playerSettings != null)
@@ -233,9 +234,20 @@ namespace Core
{
Debug.LogError("Failed to load BirdPooperSettings");
}
if (statueDressupSettings != null)
{
ServiceLocator.Register<IStatueDressupSettings>(statueDressupSettings);
Logging.Debug("StatueDressupSettings registered successfully");
}
else
{
Debug.LogError("Failed to load StatueDressupSettings");
}
// Log success
_settingsLoaded = playerSettings != null && interactionSettings != null && minigameSettings != null && cardSystemSettings != null && birdPooperSettings != null;
_settingsLoaded = playerSettings != null && interactionSettings != null && minigameSettings != null
&& cardSystemSettings != null && birdPooperSettings != null && statueDressupSettings != null;
if (_settingsLoaded)
{
Logging.Debug("All settings loaded and registered with ServiceLocator");

View File

@@ -85,9 +85,17 @@ namespace Core.SaveLoad
private void OnApplicationQuit()
{
if (DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().useSaveLoadSystem)
var debugSettings = DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>();
// Only save if the save system is enabled AND dontSaveOnQuit is false
if (debugSettings.UseSaveLoadSystem && !debugSettings.DontSaveOnQuit)
{
Save();
Logging.Debug("[SaveLoadManager] Saving on application quit");
}
else if (debugSettings.DontSaveOnQuit)
{
Logging.Debug("[SaveLoadManager] Skipping save on quit (dontSaveOnQuit enabled)");
}
}

View File

@@ -55,6 +55,13 @@ namespace Core.Settings
[Tooltip("Y position where poop is destroyed (off-screen bottom)")]
[SerializeField] private float poopDestroyYPosition = -10f;
[Header("Targets")]
[Tooltip("Target scroll speed in units/s (can be different from obstacles)")]
[SerializeField] private float targetMoveSpeed = 4f;
[Tooltip("Time between target spawns in seconds")]
[SerializeField] private float targetSpawnInterval = 3f;
// Interface implementation
public float Gravity => gravity;
public float FlapForce => flapForce;
@@ -71,6 +78,8 @@ namespace Core.Settings
public float ObstacleMaxSpawnY => obstacleMaxSpawnY;
public float PoopFallSpeed => poopFallSpeed;
public float PoopDestroyYPosition => poopDestroyYPosition;
public float TargetMoveSpeed => targetMoveSpeed;
public float TargetSpawnInterval => targetSpawnInterval;
public override void OnValidate()
{
@@ -83,6 +92,8 @@ namespace Core.Settings
maxRotationAngle = Mathf.Clamp(maxRotationAngle, 0f, 90f);
rotationSpeed = Mathf.Max(0.1f, rotationSpeed);
obstacleSpawnInterval = Mathf.Max(0.1f, obstacleSpawnInterval);
targetMoveSpeed = Mathf.Max(0.1f, targetMoveSpeed);
targetSpawnInterval = Mathf.Max(0.1f, targetSpawnInterval);
}
}
}

View File

@@ -29,8 +29,12 @@ namespace AppleHills.Core.Settings
[SerializeField] public bool pauseTimeOnPauseGame = true;
[Header("Save Load Options")]
[Tooltip("Should use save laod system?")]
[Tooltip("Should use save load system?")]
[SerializeField] public bool useSaveLoadSystem = true;
[Tooltip("Automatically clear all saves before entering play mode in editor")]
[SerializeField] public bool autoClearSaves = false;
[Tooltip("Load saves on start but don't save/overwrite data on exit")]
[SerializeField] public bool dontSaveOnQuit = false;
[Header("Logging Options")]
[Tooltip("Logging level for bootstrap services")]
@@ -49,6 +53,9 @@ namespace AppleHills.Core.Settings
// Property getters
public bool ShowDebugUiMessages => showDebugUiMessages;
public bool PauseTimeOnPauseGame => pauseTimeOnPauseGame;
public bool UseSaveLoadSystem => useSaveLoadSystem;
public bool AutoClearSaves => autoClearSaves;
public bool DontSaveOnQuit => dontSaveOnQuit;
public override void OnValidate()
{

View File

@@ -28,6 +28,10 @@
// Poop Projectile
float PoopFallSpeed { get; }
float PoopDestroyYPosition { get; }
// Targets
float TargetMoveSpeed { get; }
float TargetSpawnInterval { get; }
}
}

View File

@@ -23,5 +23,8 @@ namespace AppleHills.Core.Settings
public PickupItemData slotItem; // The slot object (SO reference)
public List<PickupItemData> allowedItems;
public List<PickupItemData> forbiddenItems; // Items that cannot be placed in this slot
[Tooltip("Number of items required to complete this slot. If 0, requires ALL allowed items.")]
public int requiredItemCount; // 0 = require all allowed items (backward compatible)
}
}

View File

@@ -1,5 +1,6 @@
using UnityEngine;
using System.Collections.Generic;
using Minigames.StatueDressup.Data;
namespace AppleHills.Core.Settings
{
@@ -160,4 +161,45 @@ namespace AppleHills.Core.Settings
// General Animation
float DefaultAnimationDuration { get; }
}
/// <summary>
/// Interface for statue dressup minigame settings
/// </summary>
public interface IStatueDressupSettings
{
// Decoration Display
Vector2 DefaultAuthoredSize { get; }
// Decoration Content
List<DecorationData> AllDecorations { get; }
// Menu Configuration
int ItemsPerPage { get; }
int GridColumns { get; }
Vector2 GridSpacing { get; }
// Drag and Drop
float DragScaleTransitionDuration { get; }
float ReturnToMenuDuration { get; }
float MinOverlapPercentage { get; }
// Animation
float HoverScaleMultiplier { get; }
float HoverAnimationDuration { get; }
float PlacementAnimationDuration { get; }
// Photo Settings
string PhotoSaveKey { get; }
int PhotoQuality { get; }
bool CaptureFullScreen { get; }
// Rewards
int CardsRewardCount { get; }
bool AutoCompleteOnPhoto { get; }
// State Persistence
bool EnableStatePersistence { get; }
string StateSaveKey { get; }
int MaxSavedDecorations { get; }
}
}

View File

@@ -0,0 +1,149 @@
using System.Collections.Generic;
using AppleHills.Core.Settings;
using Minigames.StatueDressup.Data;
using UnityEngine;
namespace Core.Settings
{
/// <summary>
/// Settings for the Mr. Cement Statue Decoration minigame
/// </summary>
[CreateAssetMenu(fileName = "StatueDressupSettings", menuName = "AppleHills/Settings/Statue Dressup", order = 7)]
public class StatueDressupSettings : BaseSettings, IStatueDressupSettings
{
[Header("Decoration Display")]
[Tooltip("Default full size for decorations when placed on statue")]
[SerializeField] private Vector2 defaultAuthoredSize = new Vector2(128f, 128f);
[Header("Decoration Content")]
[Tooltip("List of all available decoration data assets")]
[SerializeField] private List<DecorationData> allDecorations = new List<DecorationData>();
[Header("Menu Configuration")]
[Tooltip("Number of decoration items to display per page (2 columns x 5 rows = 10)")]
[SerializeField] private int itemsPerPage = 10;
[Tooltip("Number of columns in the decoration grid")]
[SerializeField] private int gridColumns = 2;
[Tooltip("Spacing between grid items")]
[SerializeField] private Vector2 gridSpacing = new Vector2(10f, 10f);
[Header("Drag and Drop")]
[Tooltip("Duration for icon to full size transition when dragging starts")]
[SerializeField] private float dragScaleTransitionDuration = 0.2f;
[Tooltip("Duration for return to menu animation")]
[SerializeField] private float returnToMenuDuration = 0.3f;
[Tooltip("Minimum overlap percentage required to place on statue (0-1)")]
[SerializeField] private float minOverlapPercentage = 0.1f;
[Header("Animation")]
[Tooltip("Scale multiplier for hover effect (1.0 = no change, 1.1 = 10% larger)")]
[SerializeField] private float hoverScaleMultiplier = 1.05f;
[Tooltip("Duration of hover animation")]
[SerializeField] private float hoverAnimationDuration = 0.2f;
[Tooltip("Duration for placement animation")]
[SerializeField] private float placementAnimationDuration = 0.15f;
[Header("Photo Settings")]
[Tooltip("PlayerPrefs key for saving the statue photo")]
[SerializeField] private string photoSaveKey = "MrCementStatuePhoto";
[Tooltip("Quality of the captured photo (1-100)")]
[SerializeField] private int photoQuality = 85;
[Tooltip("Whether to capture full screen or just statue area")]
[SerializeField] private bool captureFullScreen;
[Header("Rewards")]
[Tooltip("Number of Blokkemon cards awarded on completion")]
[SerializeField] private int cardsRewardCount = 3;
[Tooltip("Whether completion is automatic or requires confirmation")]
[SerializeField] private bool autoCompleteOnPhoto = true;
[Header("State Persistence")]
[Tooltip("Whether to save decoration positions between sessions")]
[SerializeField] private bool enableStatePersistence = true;
[Tooltip("PlayerPrefs key for saving decoration state")]
[SerializeField] private string stateSaveKey = "StatueDecorationState";
[Tooltip("Maximum number of decorations to save")]
[SerializeField] private int maxSavedDecorations = 50;
// IStatueDressupSettings implementation - Decoration Display
public Vector2 DefaultAuthoredSize => defaultAuthoredSize;
// IStatueDressupSettings implementation - Decoration Content
public List<DecorationData> AllDecorations => allDecorations;
// IStatueDressupSettings implementation - Menu Configuration
public int ItemsPerPage => itemsPerPage;
public int GridColumns => gridColumns;
public Vector2 GridSpacing => gridSpacing;
// IStatueDressupSettings implementation - Drag and Drop
public float DragScaleTransitionDuration => dragScaleTransitionDuration;
public float ReturnToMenuDuration => returnToMenuDuration;
public float MinOverlapPercentage => minOverlapPercentage;
// IStatueDressupSettings implementation - Animation
public float HoverScaleMultiplier => hoverScaleMultiplier;
public float HoverAnimationDuration => hoverAnimationDuration;
public float PlacementAnimationDuration => placementAnimationDuration;
// IStatueDressupSettings implementation - Photo Settings
public string PhotoSaveKey => photoSaveKey;
public int PhotoQuality => photoQuality;
public bool CaptureFullScreen => captureFullScreen;
// IStatueDressupSettings implementation - Rewards
public int CardsRewardCount => cardsRewardCount;
public bool AutoCompleteOnPhoto => autoCompleteOnPhoto;
// IStatueDressupSettings implementation - State Persistence
public bool EnableStatePersistence => enableStatePersistence;
public string StateSaveKey => stateSaveKey;
public int MaxSavedDecorations => maxSavedDecorations;
public override void OnValidate()
{
base.OnValidate();
// Validate decoration display
defaultAuthoredSize.x = Mathf.Max(32f, defaultAuthoredSize.x);
defaultAuthoredSize.y = Mathf.Max(32f, defaultAuthoredSize.y);
// Validate menu configuration
itemsPerPage = Mathf.Max(1, itemsPerPage);
gridColumns = Mathf.Max(1, gridColumns);
gridSpacing.x = Mathf.Max(0f, gridSpacing.x);
gridSpacing.y = Mathf.Max(0f, gridSpacing.y);
// Validate drag and drop
dragScaleTransitionDuration = Mathf.Max(0.01f, dragScaleTransitionDuration);
returnToMenuDuration = Mathf.Max(0.01f, returnToMenuDuration);
minOverlapPercentage = Mathf.Clamp01(minOverlapPercentage);
// Validate animation
hoverScaleMultiplier = Mathf.Max(1f, hoverScaleMultiplier);
hoverAnimationDuration = Mathf.Max(0.01f, hoverAnimationDuration);
placementAnimationDuration = Mathf.Max(0.01f, placementAnimationDuration);
// Validate photo settings
photoQuality = Mathf.Clamp(photoQuality, 1, 100);
// Validate rewards
cardsRewardCount = Mathf.Max(0, cardsRewardCount);
// Validate state persistence
maxSavedDecorations = Mathf.Max(1, maxSavedDecorations);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4fcf232a64e34f489b874519cc96339e
timeCreated: 1763984221

View File

@@ -1,84 +1,131 @@
using System.Collections;
using Unity.Cinemachine;
using UnityEngine;
using System.Collections;
public class EagleEyeBehaviour : MonoBehaviour
namespace DamianExperiments
{
[SerializeField] private CinemachineCamera virtualCamera;
[SerializeField] private CinemachineConfiner2D confiner2D;
[SerializeField] private float zoomOutOrthoSize = 30f;
[SerializeField] private float normalOrthoSize = 15f;
private float currentOrthoSize;
[SerializeField] private float transitionDuration = 0.5f; // Duration of the transition
[SerializeField] private float eagleEyeDuration = 3f; // Duration to stay zoomed out
[SerializeField] private bool disablePlayerInputDuringEagleEye = true; // Gate input disable
[SerializeField] private UnityEngine.UI.Button eagleEyeButton; // Reference to the UI button
private Coroutine zoomCoroutine;
public void ActivateEagleEye()
public class EagleEyeBehaviour : MonoBehaviour
{
//Assigns the Virtual Camera and Confiner if not already assigned
if (virtualCamera == null)
{
virtualCamera = FindAnyObjectByType<CinemachineCamera>();
}
if (confiner2D == null)
{
confiner2D = virtualCamera.GetComponent<CinemachineConfiner2D>();
}
// Serialized backing fields allow manual assignment in the inspector
private GameObject _cinecameraObject;
private CinemachineCamera _virtualCamera;
private CinemachineConfiner2D _confiner2D;
// Implementation for activating eagle eye behaviour
if (disablePlayerInputDuringEagleEye)
// Lazy-fetched properties: if null, try to find the GameObject tagged "MainCinemachineCamera"
private CinemachineCamera VirtualCamera
{
currentOrthoSize = virtualCamera.Lens.OrthographicSize;
}
if (eagleEyeButton != null)
{
eagleEyeButton.interactable = false;
}
if (zoomCoroutine != null) StopCoroutine(zoomCoroutine);
zoomCoroutine = StartCoroutine(EagleEyeSequence());
}
private IEnumerator EagleEyeSequence()
{
if (disablePlayerInputDuringEagleEye)
{
Core.GameManager.Instance.RequestPause(this); // Disable player input
}
yield return StartCoroutine(SmoothOrthoSize(virtualCamera, zoomOutOrthoSize, transitionDuration));
yield return new WaitForSeconds(eagleEyeDuration);
float zoomInTarget = disablePlayerInputDuringEagleEye ? currentOrthoSize : normalOrthoSize;
yield return StartCoroutine(SmoothOrthoSize(virtualCamera, zoomInTarget, transitionDuration));
if (disablePlayerInputDuringEagleEye)
{
Core.GameManager.Instance.ReleasePause(this); // Re-enable player input
}
if (eagleEyeButton != null)
{
eagleEyeButton.interactable = true;
}
}
private IEnumerator SmoothOrthoSize(CinemachineCamera cam, float targetSize, float duration)
{
float startSize = cam.Lens.OrthographicSize;
float elapsed = 0f;
while (elapsed < duration)
{
elapsed += Time.deltaTime;
cam.Lens.OrthographicSize = Mathf.Lerp(startSize, targetSize, elapsed / duration);
if (confiner2D != null)
get
{
confiner2D.InvalidateBoundingShapeCache();
if (_virtualCamera == null)
{
if (_cinecameraObject == null)
_cinecameraObject = GameObject.FindWithTag("MainCinemachineCamera");
if (_cinecameraObject != null)
{
_virtualCamera = _cinecameraObject.GetComponent<CinemachineCamera>();
if (_virtualCamera == null)
Debug.LogWarning("EagleEyeBehaviour: Found object with tag 'MainCinemachineCamera' " +
"but couldn't find a CinemachineCamera component.");
}
else
{
Debug.LogWarning("EagleEyeBehaviour: No GameObject found with tag 'MainCinemachineCamera'.");
}
}
return _virtualCamera;
}
yield return null;
set => _virtualCamera = value;
}
cam.Lens.OrthographicSize = targetSize;
if (confiner2D != null)
private CinemachineConfiner2D Confiner2D
{
confiner2D.InvalidateBoundingShapeCache();
get
{
if (_confiner2D == null)
{
// If a virtual camera exists, try to pull the confiner from it
if (VirtualCamera != null)
{
_confiner2D = VirtualCamera.GetComponent<CinemachineConfiner2D>();
}
if (_confiner2D == null)
{
Debug.LogWarning("EagleEyeBehaviour: CinemachineConfiner2D not found on the MainCinemachineCamera object.");
}
}
return _confiner2D;
}
set => _confiner2D = value;
}
[SerializeField] private float zoomOutOrthoSize = 30f;
[SerializeField] private float normalOrthoSize = 15f;
[SerializeField] private float transitionDuration = 0.5f; // Duration of the transition
[SerializeField] private float eagleEyeDuration = 3f; // Duration to stay zoomed out
[SerializeField] private UnityEngine.UI.Button eagleEyeButton; // Reference to the UI button
private Coroutine _zoomCoroutine;
private Coroutine _smoothOrthoCoroutine;
private float _currentOrthoSize;
public void ResetEagleEye()
{
if (_zoomCoroutine != null)
StopCoroutine(_zoomCoroutine);
if (_smoothOrthoCoroutine != null)
StopCoroutine(_smoothOrthoCoroutine);
if (eagleEyeButton != null)
eagleEyeButton.interactable = true;
}
public void ActivateEagleEye()
{
if (eagleEyeButton != null)
{
eagleEyeButton.interactable = false;
}
if (_zoomCoroutine != null) StopCoroutine(_zoomCoroutine);
_zoomCoroutine = StartCoroutine(EagleEyeSequence());
}
private IEnumerator EagleEyeSequence()
{
_smoothOrthoCoroutine = StartCoroutine(SmoothOrthoSize(VirtualCamera, zoomOutOrthoSize, transitionDuration));
yield return _smoothOrthoCoroutine;
yield return new WaitForSeconds(eagleEyeDuration);
float zoomInTarget = normalOrthoSize;
_smoothOrthoCoroutine = StartCoroutine(SmoothOrthoSize(VirtualCamera, zoomInTarget, transitionDuration));;
yield return _smoothOrthoCoroutine;
if (eagleEyeButton != null)
{
eagleEyeButton.interactable = true;
}
}
private IEnumerator SmoothOrthoSize(CinemachineCamera cam, float targetSize, float duration)
{
float startSize = cam.Lens.OrthographicSize;
float elapsed = 0f;
while (elapsed < duration)
{
elapsed += Time.deltaTime;
cam.Lens.OrthographicSize = Mathf.Lerp(startSize, targetSize, elapsed / duration);
if (Confiner2D != null)
{
Confiner2D.InvalidateBoundingShapeCache();
}
yield return null;
}
cam.Lens.OrthographicSize = targetSize;
if (Confiner2D != null)
{
Confiner2D.InvalidateBoundingShapeCache();
}
}
}
}

View File

@@ -30,7 +30,7 @@ public class cameraSwitcherNailBird : MonoBehaviour
private void OnTriggerExit2D(Collider2D other)
{
if (other.CompareTag("Player"))
if (other.CompareTag("Player") && gameObject.activeInHierarchy)
{
playerInsideCount--;
if (playerInsideCount == 0 && virtualCamera != null)

View File

@@ -38,6 +38,11 @@ namespace Interactions
protected FollowerController FollowerController;
private bool isActive = true;
/// <summary>
/// Gets whether this interactable is currently active (can be clicked)
/// </summary>
public bool IsActive => isActive;
// Action component system
private List<InteractionActionBase> _registeredActions = new List<InteractionActionBase>();
@@ -443,6 +448,14 @@ namespace Interactions
isActive = true;
}
/// <summary>
/// Enable or disable this interactable
/// </summary>
public void SetActive(bool active)
{
isActive = active;
}
#endregion
#region Legacy Methods & Compatibility

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq; // for Count() on List<bool>
using UnityEngine;
using UnityEngine.Events;
using System; // for Action<T>
@@ -23,8 +24,9 @@ namespace Interactions
public class ItemSlotSaveData
{
public ItemSlotState slotState;
public string slottedItemSaveId;
public string slottedItemDataId; // ItemId of the PickupItemData (for verification)
public List<string> slottedItemSaveIds = new List<string>(); // Changed to list for multi-slot support
public List<string> slottedItemDataIds = new List<string>(); // Changed to list for multi-slot support
public bool isLocked; // Track if slot is completed and locked
}
/// <summary>
@@ -37,13 +39,17 @@ namespace Interactions
public PickupItemData itemData;
public SpriteRenderer iconRenderer;
// Slotted item tracking
private PickupItemData currentlySlottedItemData;
public SpriteRenderer slottedItemRenderer;
private GameObject currentlySlottedItemObject;
// Multi-slot item tracking
private List<PickupItemData> slottedItemsData = new List<PickupItemData>();
public SpriteRenderer[] slottedItemRenderers; // Array of renderers for multiple items
private List<GameObject> slottedItemObjects = new List<GameObject>();
private List<bool> slottedItemCorrectness = new List<bool>(); // Track which items are correct
// Tracks the current state of the slotted item
// Tracks the current state of the slotted item(s)
private ItemSlotState currentState = ItemSlotState.None;
// Lock flag to prevent removal after successful completion
private bool isLockedAfterCompletion;
// Settings reference
private IInteractionSettings interactionSettings;
@@ -53,10 +59,53 @@ namespace Interactions
/// Read-only access to the current slotted item state.
/// </summary>
public ItemSlotState CurrentSlottedState => currentState;
/// <summary>
/// Number of items currently slotted (correct or incorrect)
/// </summary>
public int CurrentSlottedCount => slottedItemObjects.Count;
/// <summary>
/// Number of CORRECT items currently slotted
/// </summary>
public int CurrentCorrectCount => slottedItemCorrectness.Count(correct => correct);
/// <summary>
/// Number of items required to complete this slot
/// </summary>
public int RequiredItemCount
{
get
{
var config = interactionSettings?.GetSlotItemConfig(itemData);
if (config != null)
{
// If requiredItemCount is set (> 0), use it; otherwise require all allowed items
return config.requiredItemCount > 0 ? config.requiredItemCount : (config.allowedItems?.Count ?? 0);
}
return 1; // Default to 1 for backward compatibility
}
}
/// <summary>
/// Whether this slot has all required CORRECT items
/// </summary>
public bool IsComplete => CurrentCorrectCount >= RequiredItemCount && RequiredItemCount > 0;
/// <summary>
/// Whether this slot has space for more items
/// </summary>
public bool HasSpace => slottedItemRenderers != null && CurrentSlottedCount < slottedItemRenderers.Length;
/// <summary>
/// Whether this is a multi-slot (more than one renderer)
/// </summary>
private bool IsMultiSlot => slottedItemRenderers != null && slottedItemRenderers.Length > 1;
public UnityEvent onItemSlotted;
public UnityEvent onItemSlotRemoved;
// Native C# event alternative for code-only subscribers
// Native C# event alternatives for code-only subscribers
public event Action<PickupItemData, PickupItemData> OnItemSlotted; // (slotData, slottedItemData)
public event Action<PickupItemData> OnItemSlotRemoved;
public UnityEvent onCorrectItemSlotted;
@@ -69,17 +118,30 @@ namespace Interactions
public UnityEvent onForbiddenItemSlotted;
/// <summary>
/// Get the first (or only) slotted object - for backward compatibility
/// </summary>
public GameObject GetSlottedObject()
{
return currentlySlottedItemObject;
return slottedItemObjects.Count > 0 ? slottedItemObjects[0] : null;
}
/// <summary>
/// Set a slotted object - for backward compatibility, replaces first item or adds
/// </summary>
public void SetSlottedObject(GameObject obj)
{
currentlySlottedItemObject = obj;
if (currentlySlottedItemObject != null)
if (obj != null)
{
currentlySlottedItemObject.SetActive(false);
if (slottedItemObjects.Count == 0)
{
slottedItemObjects.Add(obj);
}
else
{
slottedItemObjects[0] = obj;
}
obj.SetActive(false);
}
}
@@ -134,12 +196,32 @@ namespace Interactions
{
var heldItem = FollowerController?.CurrentlyHeldItemData;
// Check if slot is locked after completion
if (isLockedAfterCompletion)
{
if (heldItem != null)
return (false, "This is already complete.");
else
return (false, "I can't remove these items.");
}
// Scenario: Nothing held + Empty slot = Error
if (heldItem == null && currentlySlottedItemObject == null)
if (heldItem == null && CurrentSlottedCount == 0)
return (false, "This requires an item.");
// Check forbidden items if trying to slot into empty slot
if (heldItem != null && currentlySlottedItemObject == null)
// If holding an item and slot is full but not complete, allow swap
if (heldItem != null && !HasSpace)
{
// Allow swap for fixing mistakes (single-slot or multi-slot not complete)
if (!IsMultiSlot || !IsComplete)
return (true, null); // Allow swap
// Multi-slot is complete - can't swap
return (false, "This slot is full.");
}
// Check forbidden items if trying to slot
if (heldItem != null)
{
var config = interactionSettings?.GetSlotItemConfig(itemData);
var forbidden = config?.forbiddenItems ?? new List<PickupItemData>();
@@ -153,7 +235,7 @@ namespace Interactions
/// <summary>
/// Main interaction logic: Slot, pickup, swap, or combine items.
/// Returns true only if correct item was slotted.
/// Returns true only if correct item was slotted AND slot is now complete.
/// </summary>
protected override bool DoInteraction()
{
@@ -162,24 +244,33 @@ namespace Interactions
var heldItemData = FollowerController.CurrentlyHeldItemData;
var heldItemObj = FollowerController.GetHeldPickupObject();
// Scenario 1: Held item + Empty slot = Slot it
if (heldItemData != null && currentlySlottedItemObject == null)
// Scenario 1: Held item + Has space = Slot it
if (heldItemData != null && HasSpace)
{
SlotItem(heldItemObj, heldItemData);
FollowerController.ClearHeldItem(); // Clear follower's hand after slotting
return IsSlottedItemCorrect();
// Check if we completed the slot
if (IsComplete)
{
isLockedAfterCompletion = true;
currentState = ItemSlotState.Correct;
return true; // Completed!
}
return false; // Slotted but not complete yet
}
// Scenario 2 & 3: Slot is full
if (currentlySlottedItemObject != null)
if (CurrentSlottedCount > 0)
{
// Try combination if both items present
if (heldItemData != null)
// Try combination if both items present (only for single slots)
if (heldItemData != null && !IsMultiSlot)
{
var slottedPickup = currentlySlottedItemObject.GetComponent<Pickup>();
var slottedPickup = slottedItemObjects[0].GetComponent<Pickup>();
if (slottedPickup != null)
{
var comboResult = FollowerController.TryCombineItems(slottedPickup, out var combinationResultItem);
var comboResult = FollowerController.TryCombineItems(slottedPickup, out _);
if (comboResult == FollowerController.CombinationResult.Successful)
{
@@ -190,55 +281,88 @@ namespace Interactions
}
}
// No combination or unsuccessful - perform swap
// Step 1: Pickup from slot (follower now holds the old slotted item)
FollowerController.TryPickupItem(currentlySlottedItemObject, currentlySlottedItemData, dropItem: false);
ClearSlot();
// Step 2: If we had a held item, slot it (follower already holding picked up item, don't clear!)
if (heldItemData != null)
// Swap behavior when slot is full (single slots OR multi-slots that aren't complete)
if (heldItemData != null && !HasSpace)
{
SlotItem(heldItemObj, heldItemData);
// Don't clear follower - they're holding the item they picked up from the slot
return IsSlottedItemCorrect();
// For single slots: always allow swap
// For multi-slots: only allow swap if not complete yet (allows fixing mistakes)
if (!IsMultiSlot || !IsComplete)
{
// LIFO swap - swap with the last item
int lastIndex = CurrentSlottedCount - 1;
var itemToReturn = slottedItemObjects[lastIndex];
var itemDataToReturn = slottedItemsData[lastIndex];
// Step 1: Give old item to follower
FollowerController.TryPickupItem(itemToReturn, itemDataToReturn, dropItem: false);
// Step 2: Remove old item from slot
RemoveItemAtIndex(lastIndex);
// Step 3: Slot the new item
SlotItem(heldItemObj, heldItemData);
// Check if we completed the slot with this swap
if (IsComplete)
{
isLockedAfterCompletion = true;
currentState = ItemSlotState.Correct;
return true; // Completed!
}
return false; // Swapped but not complete
}
}
// Just picked up from slot - not a success
return false;
// Pickup from slot (empty hands) - LIFO removal
if (heldItemData == null)
{
int lastIndex = CurrentSlottedCount - 1;
var itemToPickup = slottedItemObjects[lastIndex];
var itemDataToPickup = slottedItemsData[lastIndex];
// Try to give item to follower
FollowerController.TryPickupItem(itemToPickup, itemDataToPickup, dropItem: false);
// Remove from slot
RemoveItemAtIndex(lastIndex);
// Just picked up from slot - not a success
return false;
}
}
// Shouldn't reach here (validation prevents empty + no held)
return false;
}
/// <summary>
/// Helper: Check if the currently slotted item is correct.
/// </summary>
private bool IsSlottedItemCorrect()
{
return currentState == ItemSlotState.Correct;
}
/// <summary>
/// Helper: Clear the slot and fire removal events.
/// </summary>
private void ClearSlot()
{
var previousData = currentlySlottedItemData;
var previousData = slottedItemsData.Count > 0 ? slottedItemsData[0] : null;
// Clear the pickup's OwningSlot reference
if (currentlySlottedItemObject != null)
// Clear all pickup's OwningSlot references
foreach (var itemObj in slottedItemObjects)
{
var pickup = currentlySlottedItemObject.GetComponent<Pickup>();
if (pickup != null)
if (itemObj != null)
{
pickup.OwningSlot = null;
var pickup = itemObj.GetComponent<Pickup>();
if (pickup != null)
{
pickup.OwningSlot = null;
}
}
}
currentlySlottedItemObject = null;
currentlySlottedItemData = null;
slottedItemObjects.Clear();
slottedItemsData.Clear();
slottedItemCorrectness.Clear(); // Also clear correctness tracking
currentState = ItemSlotState.None;
isLockedAfterCompletion = false;
UpdateSlottedSprite();
// Fire removal events
@@ -246,35 +370,92 @@ namespace Interactions
OnItemSlotRemoved?.Invoke(previousData);
}
/// <summary>
/// Helper: Remove a specific item from the slot by index.
/// </summary>
private void RemoveItemAtIndex(int index)
{
if (index < 0 || index >= CurrentSlottedCount)
return;
var itemObj = slottedItemObjects[index];
var removedItemData = slottedItemsData[index];
// Clear the pickup's OwningSlot reference
if (itemObj != null)
{
var pickup = itemObj.GetComponent<Pickup>();
if (pickup != null)
{
pickup.OwningSlot = null;
}
}
slottedItemObjects.RemoveAt(index);
slottedItemsData.RemoveAt(index);
slottedItemCorrectness.RemoveAt(index); // Also remove correctness tracking
if (CurrentSlottedCount == 0)
{
currentState = ItemSlotState.None;
isLockedAfterCompletion = false;
}
UpdateSlottedSprite();
// Fire removal events
onItemSlotRemoved?.Invoke();
OnItemSlotRemoved?.Invoke(removedItemData);
}
#endregion
#region Visual Updates
/// <summary>
/// Updates the sprite and scale for the currently slotted item.
/// Updates the sprite and scale for all slotted items.
/// </summary>
private void UpdateSlottedSprite()
{
if (slottedItemRenderer != null && currentlySlottedItemData != null && currentlySlottedItemData.mapSprite != null)
if (slottedItemRenderers == null || slottedItemRenderers.Length == 0)
return;
// Update each renderer based on slotted items
for (int i = 0; i < slottedItemRenderers.Length; i++)
{
slottedItemRenderer.sprite = currentlySlottedItemData.mapSprite;
// Scale sprite to desired height, preserve aspect ratio, compensate for parent scale
float desiredHeight = playerFollowerSettings?.HeldIconDisplayHeight ?? 2.0f;
var sprite = currentlySlottedItemData.mapSprite;
float spriteHeight = sprite.bounds.size.y;
Vector3 parentScale = slottedItemRenderer.transform.parent != null
? slottedItemRenderer.transform.parent.localScale
: Vector3.one;
if (spriteHeight > 0f)
var slotRenderer = slottedItemRenderers[i];
if (slotRenderer == null)
continue;
// If we have an item at this index, show it
if (i < slottedItemsData.Count && slottedItemsData[i] != null)
{
float uniformScale = desiredHeight / spriteHeight;
float scale = uniformScale / Mathf.Max(parentScale.x, parentScale.y);
slottedItemRenderer.transform.localScale = new Vector3(scale, scale, 1f);
var slottedData = slottedItemsData[i];
if (slottedData.mapSprite != null)
{
slotRenderer.sprite = slottedData.mapSprite;
// Scale sprite to desired height, preserve aspect ratio, compensate for parent scale
float desiredHeight = playerFollowerSettings?.HeldIconDisplayHeight ?? 2.0f;
var sprite = slottedData.mapSprite;
float spriteHeight = sprite.bounds.size.y;
Vector3 parentScale = slotRenderer.transform.parent != null
? slotRenderer.transform.parent.localScale
: Vector3.one;
if (spriteHeight > 0f)
{
float uniformScale = desiredHeight / spriteHeight;
float scale = uniformScale / Mathf.Max(parentScale.x, parentScale.y);
slotRenderer.transform.localScale = new Vector3(scale, scale, 1f);
}
}
}
else
{
// Clear renderer if no item at this index
slotRenderer.sprite = null;
}
}
else if (slottedItemRenderer != null)
{
slottedItemRenderer.sprite = null;
}
}
@@ -297,31 +478,47 @@ namespace Interactions
protected override object GetSerializableState()
{
// Get slotted item save ID if there's a slotted item
string slottedSaveId = "";
string slottedDataId = "";
if (currentlySlottedItemObject != null)
var saveData = new ItemSlotSaveData
{
var slottedPickup = currentlySlottedItemObject.GetComponent<Pickup>();
if (slottedPickup is SaveableInteractable saveablePickup)
slotState = currentState,
isLocked = isLockedAfterCompletion
};
// Save all slotted items
foreach (var itemObj in slottedItemObjects)
{
if (itemObj != null)
{
slottedSaveId = saveablePickup.SaveId;
var slottedPickup = itemObj.GetComponent<Pickup>();
if (slottedPickup is SaveableInteractable saveablePickup)
{
saveData.slottedItemSaveIds.Add(saveablePickup.SaveId);
}
else
{
saveData.slottedItemSaveIds.Add("");
}
}
else
{
saveData.slottedItemSaveIds.Add("");
}
}
// Also save the itemData ID for verification
if (currentlySlottedItemData != null)
// Save all item data IDs for verification
foreach (var slottedData in slottedItemsData)
{
slottedDataId = currentlySlottedItemData.itemId;
if (slottedData != null)
{
saveData.slottedItemDataIds.Add(slottedData.itemId);
}
else
{
saveData.slottedItemDataIds.Add("");
}
}
return new ItemSlotSaveData
{
slotState = currentState,
slottedItemSaveId = slottedSaveId,
slottedItemDataId = slottedDataId
};
return saveData;
}
protected override void ApplySerializableState(string serializedData)
@@ -335,13 +532,26 @@ namespace Interactions
// Restore slot state
currentState = data.slotState;
isLockedAfterCompletion = data.isLocked;
// Restore slotted item if there was one
if (!string.IsNullOrEmpty(data.slottedItemSaveId))
// Restore all slotted items if there were any
if (data.slottedItemSaveIds != null && data.slottedItemSaveIds.Count > 0)
{
Logging.Debug($"[ItemSlot] Restoring slotted item: {data.slottedItemSaveId} (itemId: {data.slottedItemDataId})");
RestoreSlottedItem(data.slottedItemSaveId, data.slottedItemDataId);
for (int i = 0; i < data.slottedItemSaveIds.Count; i++)
{
string saveId = data.slottedItemSaveIds[i];
string dataId = i < data.slottedItemDataIds.Count ? data.slottedItemDataIds[i] : "";
if (!string.IsNullOrEmpty(saveId))
{
Logging.Debug($"[ItemSlot] Restoring slotted item {i}: {saveId} (itemId: {dataId})");
RestoreSlottedItem(saveId, dataId);
}
}
}
// Update all renderers after restoration
UpdateSlottedSprite();
}
/// <summary>
@@ -411,118 +621,107 @@ namespace Interactions
return;
}
// Silently slot the item (no events, no interaction completion)
// Add to slotted items list (no events, no interaction completion)
// Follower state is managed separately during save/load restoration
ApplySlottedItemState(slottedObject, slottedData, triggerEvents: false);
slottedItemObjects.Add(slottedObject);
slottedItemsData.Add(slottedData);
Logging.Debug($"[ItemSlot] Successfully restored slotted item: {slottedData.itemName} (itemId: {slottedData.itemId})");
}
/// <summary>
/// Core logic for slotting an item. Can be used both for normal slotting and silent restoration.
/// NOTE: Does NOT call CompleteInteraction - the template method handles that via DoInteraction return value.
/// NOTE: Does NOT manage follower state - caller is responsible for clearing follower's hand if needed.
/// </summary>
/// <param name="itemToSlot">The item GameObject to slot (or null to clear)</param>
/// <param name="itemToSlotData">The PickupItemData for the item</param>
/// <param name="triggerEvents">Whether to fire events</param>
private void ApplySlottedItemState(GameObject itemToSlot, PickupItemData itemToSlotData, bool triggerEvents)
{
if (itemToSlot == null)
// Determine if this item is correct for correctness tracking
var config = interactionSettings?.GetSlotItemConfig(itemData);
var allowed = config?.allowedItems ?? new List<PickupItemData>();
bool isCorrectItem = PickupItemData.ListContainsEquivalent(allowed, slottedData);
slottedItemCorrectness.Add(isCorrectItem);
// Deactivate the item and set pickup state
slottedObject.SetActive(false);
if (pickup != null)
{
// Clear slot - also clear the pickup's OwningSlot reference
if (currentlySlottedItemObject != null)
{
var oldPickup = currentlySlottedItemObject.GetComponent<Pickup>();
if (oldPickup != null)
{
oldPickup.OwningSlot = null;
}
}
var previousData = currentlySlottedItemData;
currentlySlottedItemObject = null;
currentlySlottedItemData = null;
currentState = ItemSlotState.None;
// Fire native event for slot clearing (only if triggering events)
if (previousData != null && triggerEvents)
{
onItemSlotRemoved?.Invoke();
OnItemSlotRemoved?.Invoke(previousData);
}
}
else
{
// Slot the item
itemToSlot.SetActive(false);
itemToSlot.transform.SetParent(null);
SetSlottedObject(itemToSlot);
currentlySlottedItemData = itemToSlotData;
// Mark the pickup as picked up and track slot ownership for save/load
var pickup = itemToSlot.GetComponent<Pickup>();
if (pickup != null)
{
pickup.IsPickedUp = true;
pickup.OwningSlot = this;
}
// Determine if correct
var config = interactionSettings?.GetSlotItemConfig(itemData);
var allowed = config?.allowedItems ?? new List<PickupItemData>();
if (itemToSlotData != null && PickupItemData.ListContainsEquivalent(allowed, itemToSlotData))
{
currentState = ItemSlotState.Correct;
// Fire events if requested
if (triggerEvents)
{
DebugUIMessage.Show($"You correctly slotted {itemToSlotData.itemName} into: {itemData.itemName}", Color.green);
onCorrectItemSlotted?.Invoke();
OnCorrectItemSlotted?.Invoke(itemData, currentlySlottedItemData);
}
}
else
{
currentState = ItemSlotState.Incorrect;
// Fire events if requested
if (triggerEvents)
{
DebugUIMessage.Show("I'm not sure this works.", Color.yellow);
onIncorrectItemSlotted?.Invoke();
OnIncorrectItemSlotted?.Invoke(itemData, currentlySlottedItemData);
}
}
pickup.IsPickedUp = true;
pickup.OwningSlot = this;
}
UpdateSlottedSprite();
Logging.Debug($"[ItemSlot] Successfully restored slotted item: {slottedData.itemName} (itemId: {slottedData.itemId}, correct: {isCorrectItem})");
}
/// <summary>
/// Public API for slotting items during gameplay.
/// Adds item to the slot (multi-slot support).
/// Caller is responsible for managing follower's held item state.
/// </summary>
public void SlotItem(GameObject itemToSlot, PickupItemData itemToSlotData)
{
ApplySlottedItemState(itemToSlot, itemToSlotData, triggerEvents: true);
if (itemToSlot == null || itemToSlotData == null)
{
Logging.Warning($"[ItemSlot] Attempted to slot null item or data");
return;
}
// Determine if this item is correct (allowed)
var config = interactionSettings?.GetSlotItemConfig(itemData);
var allowed = config?.allowedItems ?? new List<PickupItemData>();
bool isCorrectItem = PickupItemData.ListContainsEquivalent(allowed, itemToSlotData);
// Add to lists
slottedItemObjects.Add(itemToSlot);
slottedItemsData.Add(itemToSlotData);
slottedItemCorrectness.Add(isCorrectItem); // Track correctness
// Deactivate item and set pickup state
itemToSlot.SetActive(false);
itemToSlot.transform.SetParent(null);
var pickup = itemToSlot.GetComponent<Pickup>();
if (pickup != null)
{
pickup.IsPickedUp = true;
pickup.OwningSlot = this;
}
// Update visuals
UpdateSlottedSprite();
// Fire events based on correctness
if (isCorrectItem)
{
DebugUIMessage.Show($"You slotted {itemToSlotData.itemName} into: {itemData.itemName}", Color.green);
// Fire generic slot event
onItemSlotted?.Invoke();
OnItemSlotted?.Invoke(itemData, itemToSlotData);
// Only fire correct completion event if ALL required CORRECT items are now slotted
if (IsComplete)
{
currentState = ItemSlotState.Correct;
DebugUIMessage.Show($"Completed: {itemData.itemName}", Color.green);
onCorrectItemSlotted?.Invoke();
OnCorrectItemSlotted?.Invoke(itemData, itemToSlotData);
}
}
else
{
// Incorrect item slotted
DebugUIMessage.Show($"Slotted {itemToSlotData.itemName}, but it might not be right...", Color.yellow);
onItemSlotted?.Invoke(); // Still fire generic event
OnItemSlotted?.Invoke(itemData, itemToSlotData);
onIncorrectItemSlotted?.Invoke();
OnIncorrectItemSlotted?.Invoke(itemData, itemToSlotData);
}
}
/// <summary>
/// Bilateral restoration entry point: Pickup calls this to offer itself to the Slot.
/// Returns true if claim was successful, false if slot already has an item or wrong pickup.
/// Returns true if claim was successful, false if slot is full or wrong pickup.
/// </summary>
public bool TryClaimSlottedItem(Pickup pickup)
{
if (pickup == null)
return false;
// If slot already has an item, reject the claim
if (currentlySlottedItemObject != null)
// If slot is full, reject the claim
if (!HasSpace)
{
Logging.Warning($"[ItemSlot] Already has a slotted item, rejecting claim from {pickup.gameObject.name}");
Logging.Warning($"[ItemSlot] Slot is full, rejecting claim from {pickup.gameObject.name}");
return false;
}
@@ -530,10 +729,21 @@ namespace Interactions
// Note: We don't have easy access to the expected SaveId here, so we just accept it
// The Pickup's bilateral restoration ensures it only claims the correct slot
// Claim the pickup
ApplySlottedItemState(pickup.gameObject, pickup.itemData, triggerEvents: false);
// Add the item to lists
slottedItemObjects.Add(pickup.gameObject);
slottedItemsData.Add(pickup.itemData);
Logging.Debug($"[ItemSlot] Successfully claimed slotted item: {pickup.itemData?.itemName}");
// Determine correctness for tracking
var config = interactionSettings?.GetSlotItemConfig(itemData);
var allowed = config?.allowedItems ?? new List<PickupItemData>();
bool isCorrectItem = PickupItemData.ListContainsEquivalent(allowed, pickup.itemData);
slottedItemCorrectness.Add(isCorrectItem);
pickup.gameObject.SetActive(false);
pickup.IsPickedUp = true;
pickup.OwningSlot = this;
Logging.Debug($"[ItemSlot] Successfully claimed slotted item: {pickup.itemData?.itemName} (correct: {isCorrectItem})");
return true;
}

View File

@@ -56,12 +56,12 @@ namespace Minigames.BirdPooper
return;
}
// Register as override consumer to capture ALL input (except UI button)
// Register as override consumer to capture ALL input (except UI button)
// Register as default consumer (gets input if nothing else consumes it)
// This allows UI buttons to work while still flapping when tapping empty space
if (Input.InputManager.Instance != null)
{
Input.InputManager.Instance.RegisterOverrideConsumer(this);
Debug.Log("[BirdPlayerController] Registered as override input consumer");
Input.InputManager.Instance.SetDefaultConsumer(this);
Debug.Log("[BirdPlayerController] Registered as default input consumer");
}
else
{
@@ -161,12 +161,12 @@ namespace Minigames.BirdPooper
/// <summary>
/// Called when a trigger collider enters this object's trigger.
/// Used for detecting obstacles without physics interactions.
/// Used for detecting obstacles and targets without physics interactions.
/// </summary>
private void OnTriggerEnter2D(Collider2D other)
{
// Check if the colliding object is tagged as an obstacle
if (other.CompareTag("Obstacle"))
// Check if the colliding object is tagged as an obstacle or target
if (other.CompareTag("Obstacle") || other.CompareTag("Target"))
{
HandleDeath();
}

View File

@@ -16,7 +16,13 @@ namespace Minigames.BirdPooper
[Header("References")]
[SerializeField] private BirdPlayerController player;
[SerializeField] private ObstacleSpawner obstacleSpawner;
[SerializeField] private TargetSpawner targetSpawner;
[SerializeField] private GameOverScreen gameOverScreen;
[SerializeField] private GameObject poopPrefab;
[Header("Game State")]
private int targetsHit;
private bool isGameOver;
internal override void OnManagedAwake()
{
@@ -42,6 +48,11 @@ namespace Minigames.BirdPooper
Debug.LogError("[BirdPooperGameManager] ObstacleSpawner reference not assigned!");
}
if (targetSpawner == null)
{
Debug.LogWarning("[BirdPooperGameManager] TargetSpawner reference not assigned! Targets will not spawn.");
}
if (gameOverScreen == null)
{
Debug.LogError("[BirdPooperGameManager] GameOverScreen reference not assigned!");
@@ -51,12 +62,21 @@ namespace Minigames.BirdPooper
// Hide game over screen on start
gameOverScreen.gameObject.SetActive(false);
}
if (poopPrefab == null)
{
Debug.LogWarning("[BirdPooperGameManager] Poop prefab not assigned!");
}
}
internal override void OnManagedStart()
{
base.OnManagedStart();
// Initialize game state
isGameOver = false;
targetsHit = 0;
// Subscribe to player events
if (player != null)
{
@@ -70,6 +90,13 @@ namespace Minigames.BirdPooper
obstacleSpawner.StartSpawning();
Debug.Log("[BirdPooperGameManager] Started obstacle spawning");
}
// Start target spawning
if (targetSpawner != null)
{
targetSpawner.StartSpawning();
Debug.Log("[BirdPooperGameManager] Started target spawning");
}
}
internal override void OnManagedDestroy()
@@ -95,7 +122,10 @@ namespace Minigames.BirdPooper
/// </summary>
private void HandlePlayerDamaged()
{
Debug.Log("[BirdPooperGameManager] Player damaged - showing game over screen");
if (isGameOver) return;
isGameOver = true;
Debug.Log($"[BirdPooperGameManager] Player damaged - Game Over! Targets Hit: {targetsHit}");
// Stop spawning obstacles
if (obstacleSpawner != null)
@@ -103,6 +133,12 @@ namespace Minigames.BirdPooper
obstacleSpawner.StopSpawning();
}
// Stop spawning targets
if (targetSpawner != null)
{
targetSpawner.StopSpawning();
}
// Show game over screen
if (gameOverScreen != null)
{
@@ -113,6 +149,39 @@ namespace Minigames.BirdPooper
Debug.LogError("[BirdPooperGameManager] GameOverScreen reference missing!");
}
}
/// <summary>
/// Spawns a poop projectile at the player's current position.
/// Called by UI button OnClick event.
/// </summary>
public void SpawnPoop()
{
if (isGameOver || player == null || poopPrefab == null)
return;
Vector3 spawnPosition = player.transform.position;
Instantiate(poopPrefab, spawnPosition, Quaternion.identity);
Debug.Log($"[BirdPooperGameManager] Spawned poop at {spawnPosition}");
}
/// <summary>
/// Called when a target is successfully hit by poop (Phase 5).
/// </summary>
public void OnTargetHit()
{
if (isGameOver) return;
targetsHit++;
Debug.Log($"[BirdPooperGameManager] Target Hit! Total: {targetsHit}");
}
#region Public Accessors
public bool IsGameOver => isGameOver;
public int TargetsHit => targetsHit;
#endregion
}
}

View File

@@ -1,300 +1,28 @@
using UnityEngine;
using Core;
using Core.Settings;
using AppleHillsCamera;

namespace Minigames.BirdPooper
{
/// <summary>
/// Individual obstacle behavior for Bird Pooper minigame.
/// Scrolls left at constant speed and self-destructs when reaching despawn position.
/// Uses trigger colliders for collision detection (no Rigidbody2D needed).
/// Uses EdgeAnchor for vertical positioning (Top/Middle/Bottom).
/// Obstacle entity for Bird Pooper minigame.
/// Inherits scrolling, anchoring, and despawn behavior from ScrollingEntity.
/// Player dies on collision with obstacles.
/// </summary>
[RequireComponent(typeof(Collider2D))]
[RequireComponent(typeof(EdgeAnchor))]
public class Obstacle : MonoBehaviour
public class Obstacle : ScrollingEntity
{
[Header("Positioning")]
[Tooltip("Which vertical edge to anchor to (Top/Middle/Bottom)")]
[SerializeField] private EdgeAnchor.AnchorEdge verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
private IBirdPooperSettings settings;
private float despawnXPosition;
private bool isInitialized;
private EdgeAnchor edgeAnchor;
/// <summary>
/// Initialize the obstacle with despawn position and EdgeAnchor references.
/// Called by ObstacleSpawner immediately after instantiation.
/// Returns obstacle move speed from settings.
/// </summary>
/// <param name="despawnX">X position where obstacle should be destroyed</param>
/// <param name="referenceMarker">ScreenReferenceMarker for EdgeAnchor</param>
/// <param name="cameraAdapter">CameraScreenAdapter for EdgeAnchor</param>
public void Initialize(float despawnX, ScreenReferenceMarker referenceMarker, CameraScreenAdapter cameraAdapter)
protected override float GetMoveSpeed()
{
despawnXPosition = despawnX;
isInitialized = true;
// Load settings
settings = GameManager.GetSettingsObject<IBirdPooperSettings>();
if (settings == null)
{
Debug.LogError("[Obstacle] BirdPooperSettings not found!");
}
// Tag all child GameObjects with colliders as "Obstacle" for trigger detection
TagChildCollidersRecursive(transform);
// Configure and update EdgeAnchor
edgeAnchor = GetComponent<EdgeAnchor>();
if (edgeAnchor != null)
{
// Assign references from spawner
edgeAnchor.referenceMarker = referenceMarker;
edgeAnchor.cameraAdapter = cameraAdapter;
// Only allow Top, Middle, or Bottom anchoring
if (verticalAnchor == EdgeAnchor.AnchorEdge.Left || verticalAnchor == EdgeAnchor.AnchorEdge.Right)
{
Debug.LogWarning("[Obstacle] Invalid anchor edge (Left/Right not supported). Defaulting to Middle.");
verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
}
edgeAnchor.anchorEdge = verticalAnchor;
edgeAnchor.useReferenceMargin = false; // No custom offset
edgeAnchor.customMargin = 0f;
edgeAnchor.preserveOtherAxes = true; // Keep X position (for scrolling)
edgeAnchor.accountForObjectSize = true;
// Trigger position update
edgeAnchor.UpdatePosition();
Debug.Log($"[Obstacle] EdgeAnchor configured to {verticalAnchor} at position {transform.position}");
}
else
{
Debug.LogError("[Obstacle] EdgeAnchor component not found! Make sure the prefab has an EdgeAnchor component.");
}
Debug.Log($"[Obstacle] Initialized at position {transform.position} with despawn X: {despawnX}");
return settings != null ? settings.ObstacleMoveSpeed : 5f;
}
/// <summary>
/// Recursively tag all GameObjects with Collider2D as "Obstacle" for player collision detection.
/// Returns "Obstacle" tag for collision detection.
/// </summary>
private void TagChildCollidersRecursive(Transform current)
protected override string GetColliderTag()
{
// Tag this GameObject if it has a collider
Collider2D col = current.GetComponent<Collider2D>();
if (col != null && !current.CompareTag("Obstacle"))
{
current.tag = "Obstacle";
Debug.Log($"[Obstacle] Tagged '{current.name}' as Obstacle");
}
// Recurse to children
foreach (Transform child in current)
{
TagChildCollidersRecursive(child);
}
return "Obstacle";
}
#if UNITY_EDITOR
/// <summary>
/// Called when values are changed in the Inspector (Editor only).
/// Updates EdgeAnchor configuration to match Obstacle settings.
/// Also finds and assigns ScreenReferenceMarker and CameraScreenAdapter for visual updates.
/// </summary>
private void OnValidate()
{
// Only run in editor, not during play mode
if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode)
return;
EdgeAnchor anchor = GetComponent<EdgeAnchor>();
if (anchor != null)
{
// Auto-find and assign references if not set (for editor-time visual updates)
if (anchor.referenceMarker == null)
{
anchor.referenceMarker = FindAnyObjectByType<ScreenReferenceMarker>();
if (anchor.referenceMarker == null)
{
Debug.LogWarning("[Obstacle] No ScreenReferenceMarker found in scene. EdgeAnchor positioning won't work in editor.");
}
}
if (anchor.cameraAdapter == null)
{
anchor.cameraAdapter = FindAnyObjectByType<CameraScreenAdapter>();
// CameraScreenAdapter is optional - EdgeAnchor can auto-find camera
}
// Validate and set anchor edge
if (verticalAnchor == EdgeAnchor.AnchorEdge.Left || verticalAnchor == EdgeAnchor.AnchorEdge.Right)
{
Debug.LogWarning("[Obstacle] Invalid anchor edge (Left/Right not supported). Defaulting to Middle.");
verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
}
// Configure EdgeAnchor to match Obstacle settings
anchor.anchorEdge = verticalAnchor;
anchor.useReferenceMargin = false;
anchor.customMargin = 0f;
anchor.preserveOtherAxes = true;
anchor.accountForObjectSize = true;
// Mark as dirty so Unity saves the changes
UnityEditor.EditorUtility.SetDirty(anchor);
}
// Tag all child GameObjects with colliders as "Obstacle" for collision detection
TagChildCollidersRecursiveEditor(transform);
}
/// <summary>
/// Editor version of recursive tagging for child colliders.
/// </summary>
private void TagChildCollidersRecursiveEditor(Transform current)
{
// Tag this GameObject if it has a collider
Collider2D col = current.GetComponent<Collider2D>();
if (col != null && !current.CompareTag("Obstacle"))
{
current.tag = "Obstacle";
UnityEditor.EditorUtility.SetDirty(current.gameObject);
}
// Recurse to children
foreach (Transform child in current)
{
TagChildCollidersRecursiveEditor(child);
}
}
#endif
private void Update()
{
if (!isInitialized || settings == null) return;
MoveLeft();
CheckBounds();
}
/// <summary>
/// Move obstacle left at constant speed (manual movement, no physics).
/// </summary>
private void MoveLeft()
{
transform.position += Vector3.left * (settings.ObstacleMoveSpeed * Time.deltaTime);
}
/// <summary>
/// Check if obstacle has passed despawn position and destroy if so.
/// </summary>
private void CheckBounds()
{
if (transform.position.x < despawnXPosition)
{
Debug.Log($"[Obstacle] Reached despawn position, destroying at X: {transform.position.x}");
Destroy(gameObject);
}
}
#if UNITY_EDITOR
/// <summary>
/// Draw debug visualization of the obstacle's anchor point.
/// Red horizontal line through custom anchor point OR bounds edge (top/bottom).
/// </summary>
private void OnDrawGizmos()
{
EdgeAnchor anchor = GetComponent<EdgeAnchor>();
if (anchor == null) return;
// Determine what Y position to visualize
float visualY;
// If using custom anchor point, draw line through it
if (anchor.customAnchorPoint != null)
{
visualY = anchor.customAnchorPoint.position.y;
}
else
{
// Get bounds and determine which edge to visualize
Bounds bounds = GetVisualBounds();
// Check which vertical anchor is configured
EdgeAnchor.AnchorEdge edge = anchor.anchorEdge;
if (edge == EdgeAnchor.AnchorEdge.Top)
{
// Show top edge of bounds
visualY = bounds.max.y;
}
else if (edge == EdgeAnchor.AnchorEdge.Bottom)
{
// Show bottom edge of bounds
visualY = bounds.min.y;
}
else // Middle
{
// Show center of bounds
visualY = bounds.center.y;
}
}
// Draw thick red horizontal line through the anchor point
Color oldColor = Gizmos.color;
Gizmos.color = Color.red;
// Draw multiple lines to make it thicker
float lineLength = 2f; // Extend 2 units on each side
Vector3 leftPoint = new Vector3(transform.position.x - lineLength, visualY, transform.position.z);
Vector3 rightPoint = new Vector3(transform.position.x + lineLength, visualY, transform.position.z);
// Draw 5 lines stacked vertically to create thickness
for (int i = -2; i <= 2; i++)
{
float offset = i * 0.02f; // Small vertical offset for thickness
Vector3 offsetLeft = leftPoint + Vector3.up * offset;
Vector3 offsetRight = rightPoint + Vector3.up * offset;
Gizmos.DrawLine(offsetLeft, offsetRight);
}
Gizmos.color = oldColor;
}
/// <summary>
/// Get bounds for visualization purposes (works in editor without initialized settings).
/// </summary>
private Bounds GetVisualBounds()
{
// Get all renderers in this object and its children
Renderer[] renderers = GetComponentsInChildren<Renderer>();
if (renderers.Length > 0)
{
Bounds bounds = renderers[0].bounds;
for (int i = 1; i < renderers.Length; i++)
{
bounds.Encapsulate(renderers[i].bounds);
}
return bounds;
}
// Fallback to collider bounds
Collider2D col = GetComponent<Collider2D>();
if (col != null)
{
return col.bounds;
}
// Default small bounds
return new Bounds(transform.position, new Vector3(0.5f, 0.5f, 0.1f));
}
#endif
}
}

View File

@@ -0,0 +1,300 @@
using UnityEngine;
using Core;
using Core.Settings;
using AppleHillsCamera;
namespace Minigames.BirdPooper
{
/// <summary>
/// Individual obstacle behavior for Bird Pooper minigame.
/// Scrolls left at constant speed and self-destructs when reaching despawn position.
/// Uses trigger colliders for collision detection (no Rigidbody2D needed).
/// Uses EdgeAnchor for vertical positioning (Top/Middle/Bottom).
/// </summary>
[RequireComponent(typeof(Collider2D))]
[RequireComponent(typeof(EdgeAnchor))]
public class Obstacle : MonoBehaviour
{
[Header("Positioning")]
[Tooltip("Which vertical edge to anchor to (Top/Middle/Bottom)")]
[SerializeField] private EdgeAnchor.AnchorEdge verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
private IBirdPooperSettings settings;
private float despawnXPosition;
private bool isInitialized;
private EdgeAnchor edgeAnchor;
/// <summary>
/// Initialize the obstacle with despawn position and EdgeAnchor references.
/// Called by ObstacleSpawner immediately after instantiation.
/// </summary>
/// <param name="despawnX">X position where obstacle should be destroyed</param>
/// <param name="referenceMarker">ScreenReferenceMarker for EdgeAnchor</param>
/// <param name="cameraAdapter">CameraScreenAdapter for EdgeAnchor</param>
public void Initialize(float despawnX, ScreenReferenceMarker referenceMarker, CameraScreenAdapter cameraAdapter)
{
despawnXPosition = despawnX;
isInitialized = true;
// Load settings
settings = GameManager.GetSettingsObject<IBirdPooperSettings>();
if (settings == null)
{
Debug.LogError("[Obstacle] BirdPooperSettings not found!");
}
// Tag all child GameObjects with colliders as "Obstacle" for trigger detection
TagChildCollidersRecursive(transform);
// Configure and update EdgeAnchor
edgeAnchor = GetComponent<EdgeAnchor>();
if (edgeAnchor != null)
{
// Assign references from spawner
edgeAnchor.referenceMarker = referenceMarker;
edgeAnchor.cameraAdapter = cameraAdapter;
// Only allow Top, Middle, or Bottom anchoring
if (verticalAnchor == EdgeAnchor.AnchorEdge.Left || verticalAnchor == EdgeAnchor.AnchorEdge.Right)
{
Debug.LogWarning("[Obstacle] Invalid anchor edge (Left/Right not supported). Defaulting to Middle.");
verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
}
edgeAnchor.anchorEdge = verticalAnchor;
edgeAnchor.useReferenceMargin = false; // No custom offset
edgeAnchor.customMargin = 0f;
edgeAnchor.preserveOtherAxes = true; // Keep X position (for scrolling)
edgeAnchor.accountForObjectSize = true;
// Trigger position update
edgeAnchor.UpdatePosition();
Debug.Log($"[Obstacle] EdgeAnchor configured to {verticalAnchor} at position {transform.position}");
}
else
{
Debug.LogError("[Obstacle] EdgeAnchor component not found! Make sure the prefab has an EdgeAnchor component.");
}
Debug.Log($"[Obstacle] Initialized at position {transform.position} with despawn X: {despawnX}");
}
/// <summary>
/// Recursively tag all GameObjects with Collider2D as "Obstacle" for player collision detection.
/// </summary>
private void TagChildCollidersRecursive(Transform current)
{
// Tag this GameObject if it has a collider
Collider2D col = current.GetComponent<Collider2D>();
if (col != null && !current.CompareTag("Obstacle"))
{
current.tag = "Obstacle";
Debug.Log($"[Obstacle] Tagged '{current.name}' as Obstacle");
}
// Recurse to children
foreach (Transform child in current)
{
TagChildCollidersRecursive(child);
}
}
#if UNITY_EDITOR
/// <summary>
/// Called when values are changed in the Inspector (Editor only).
/// Updates EdgeAnchor configuration to match Obstacle settings.
/// Also finds and assigns ScreenReferenceMarker and CameraScreenAdapter for visual updates.
/// </summary>
private void OnValidate()
{
// Only run in editor, not during play mode
if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode)
return;
EdgeAnchor anchor = GetComponent<EdgeAnchor>();
if (anchor != null)
{
// Auto-find and assign references if not set (for editor-time visual updates)
if (anchor.referenceMarker == null)
{
anchor.referenceMarker = FindAnyObjectByType<ScreenReferenceMarker>();
if (anchor.referenceMarker == null)
{
Debug.LogWarning("[Obstacle] No ScreenReferenceMarker found in scene. EdgeAnchor positioning won't work in editor.");
}
}
if (anchor.cameraAdapter == null)
{
anchor.cameraAdapter = FindAnyObjectByType<CameraScreenAdapter>();
// CameraScreenAdapter is optional - EdgeAnchor can auto-find camera
}
// Validate and set anchor edge
if (verticalAnchor == EdgeAnchor.AnchorEdge.Left || verticalAnchor == EdgeAnchor.AnchorEdge.Right)
{
Debug.LogWarning("[Obstacle] Invalid anchor edge (Left/Right not supported). Defaulting to Middle.");
verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
}
// Configure EdgeAnchor to match Obstacle settings
anchor.anchorEdge = verticalAnchor;
anchor.useReferenceMargin = false;
anchor.customMargin = 0f;
anchor.preserveOtherAxes = true;
anchor.accountForObjectSize = true;
// Mark as dirty so Unity saves the changes
UnityEditor.EditorUtility.SetDirty(anchor);
}
// Tag all child GameObjects with colliders as "Obstacle" for collision detection
TagChildCollidersRecursiveEditor(transform);
}
/// <summary>
/// Editor version of recursive tagging for child colliders.
/// </summary>
private void TagChildCollidersRecursiveEditor(Transform current)
{
// Tag this GameObject if it has a collider
Collider2D col = current.GetComponent<Collider2D>();
if (col != null && !current.CompareTag("Obstacle"))
{
current.tag = "Obstacle";
UnityEditor.EditorUtility.SetDirty(current.gameObject);
}
// Recurse to children
foreach (Transform child in current)
{
TagChildCollidersRecursiveEditor(child);
}
}
#endif
private void Update()
{
if (!isInitialized || settings == null) return;
MoveLeft();
CheckBounds();
}
/// <summary>
/// Move obstacle left at constant speed (manual movement, no physics).
/// </summary>
private void MoveLeft()
{
transform.position += Vector3.left * (settings.ObstacleMoveSpeed * Time.deltaTime);
}
/// <summary>
/// Check if obstacle has passed despawn position and destroy if so.
/// </summary>
private void CheckBounds()
{
if (transform.position.x < despawnXPosition)
{
Debug.Log($"[Obstacle] Reached despawn position, destroying at X: {transform.position.x}");
Destroy(gameObject);
}
}
#if UNITY_EDITOR
/// <summary>
/// Draw debug visualization of the obstacle's anchor point.
/// Red horizontal line through custom anchor point OR bounds edge (top/bottom).
/// </summary>
private void OnDrawGizmos()
{
EdgeAnchor anchor = GetComponent<EdgeAnchor>();
if (anchor == null) return;
// Determine what Y position to visualize
float visualY;
// If using custom anchor point, draw line through it
if (anchor.customAnchorPoint != null)
{
visualY = anchor.customAnchorPoint.position.y;
}
else
{
// Get bounds and determine which edge to visualize
Bounds bounds = GetVisualBounds();
// Check which vertical anchor is configured
EdgeAnchor.AnchorEdge edge = anchor.anchorEdge;
if (edge == EdgeAnchor.AnchorEdge.Top)
{
// Show top edge of bounds
visualY = bounds.max.y;
}
else if (edge == EdgeAnchor.AnchorEdge.Bottom)
{
// Show bottom edge of bounds
visualY = bounds.min.y;
}
else // Middle
{
// Show center of bounds
visualY = bounds.center.y;
}
}
// Draw thick red horizontal line through the anchor point
Color oldColor = Gizmos.color;
Gizmos.color = Color.red;
// Draw multiple lines to make it thicker
float lineLength = 2f; // Extend 2 units on each side
Vector3 leftPoint = new Vector3(transform.position.x - lineLength, visualY, transform.position.z);
Vector3 rightPoint = new Vector3(transform.position.x + lineLength, visualY, transform.position.z);
// Draw 5 lines stacked vertically to create thickness
for (int i = -2; i <= 2; i++)
{
float offset = i * 0.02f; // Small vertical offset for thickness
Vector3 offsetLeft = leftPoint + Vector3.up * offset;
Vector3 offsetRight = rightPoint + Vector3.up * offset;
Gizmos.DrawLine(offsetLeft, offsetRight);
}
Gizmos.color = oldColor;
}
/// <summary>
/// Get bounds for visualization purposes (works in editor without initialized settings).
/// </summary>
private Bounds GetVisualBounds()
{
// Get all renderers in this object and its children
Renderer[] renderers = GetComponentsInChildren<Renderer>();
if (renderers.Length > 0)
{
Bounds bounds = renderers[0].bounds;
for (int i = 1; i < renderers.Length; i++)
{
bounds.Encapsulate(renderers[i].bounds);
}
return bounds;
}
// Fallback to collider bounds
Collider2D col = GetComponent<Collider2D>();
if (col != null)
{
return col.bounds;
}
// Default small bounds
return new Bounds(transform.position, new Vector3(0.5f, 0.5f, 0.1f));
}
#endif
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bc9c7bac4482311439b4c2e7879f3d73
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,121 @@
using Core;
using Core.Lifecycle;
using Core.Settings;
using UnityEngine;
namespace Minigames.BirdPooper
{
/// <summary>
/// Poop projectile that falls straight down with manual gravity.
/// Destroys when off-screen or hitting targets (Phase 5).
/// </summary>
[RequireComponent(typeof(Rigidbody2D))]
[RequireComponent(typeof(Collider2D))]
public class PoopProjectile : ManagedBehaviour
{
private IBirdPooperSettings settings;
private float verticalVelocity; // Current downward velocity
private const float GravityAcceleration = 20f; // Gravity acceleration (units/s²)
internal override void OnManagedAwake()
{
base.OnManagedAwake();
// Tag as Projectile for target detection
if (!gameObject.CompareTag("Projectile"))
{
gameObject.tag = "Projectile";
}
// Load settings
settings = GameManager.GetSettingsObject<IBirdPooperSettings>();
if (settings == null)
{
Debug.LogError("[PoopProjectile] BirdPooperSettings not found!");
Destroy(gameObject);
return;
}
// Initialize velocity with settings speed as starting velocity
verticalVelocity = settings.PoopFallSpeed;
// Verify Rigidbody2D configuration
Rigidbody2D rb = GetComponent<Rigidbody2D>();
if (rb != null)
{
rb.bodyType = RigidbodyType2D.Kinematic; // Kinematic = manual control, no physics
rb.collisionDetectionMode = CollisionDetectionMode2D.Continuous;
}
// Find and set all colliders to trigger (we use OnTriggerEnter2D)
Collider2D[] colliders = GetComponentsInChildren<Collider2D>(true);
foreach (Collider2D col in colliders)
{
if (!col.isTrigger)
{
col.isTrigger = true;
Debug.Log($"[PoopProjectile] Set collider '{col.name}' to trigger");
}
}
}
private void Update()
{
if (settings != null)
{
ApplyGravity();
FallDown();
CheckBounds();
}
}
/// <summary>
/// Apply gravity acceleration to velocity.
/// </summary>
private void ApplyGravity()
{
// Increase downward velocity over time (gravity acceleration)
verticalVelocity += GravityAcceleration * Time.deltaTime;
}
/// <summary>
/// Manual downward movement using current velocity.
/// </summary>
private void FallDown()
{
// Move straight down at current velocity
transform.position += Vector3.down * verticalVelocity * Time.deltaTime;
}
/// <summary>
/// Check if projectile is off-screen and should be destroyed.
/// </summary>
private void CheckBounds()
{
if (transform.position.y < settings.PoopDestroyYPosition)
{
Destroy(gameObject);
}
}
/// <summary>
/// Trigger collision detection for targets (Phase 5).
/// Uses OnTriggerEnter2D with trigger collider.
/// </summary>
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Target"))
{
// Notify target it was hit
Target target = other.GetComponent<Target>();
if (target != null)
{
target.OnHitByProjectile();
}
Destroy(gameObject);
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f2c53b7e2a0042efa4c6679b992b6b6c
timeCreated: 1763711288

View File

@@ -0,0 +1,230 @@
using UnityEngine;
using Core;
using Core.Settings;
using AppleHillsCamera;
namespace Minigames.BirdPooper
{
/// <summary>
/// Abstract base class for all scrolling entities in Bird Pooper minigame.
/// Provides common functionality: manual left-scrolling, EdgeAnchor integration, despawn detection.
/// Subclasses: Obstacle, Target
/// </summary>
[RequireComponent(typeof(Collider2D))]
[RequireComponent(typeof(EdgeAnchor))]
public abstract class ScrollingEntity : MonoBehaviour
{
[Header("Positioning")]
[Tooltip("Which vertical edge to anchor to (Top/Middle/Bottom)")]
[SerializeField] protected EdgeAnchor.AnchorEdge verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
protected IBirdPooperSettings settings;
protected float despawnXPosition;
protected bool isInitialized;
protected EdgeAnchor edgeAnchor;
/// <summary>
/// Initialize the entity with despawn position and EdgeAnchor references.
/// Called by spawner immediately after instantiation.
/// </summary>
public virtual void Initialize(float despawnX, ScreenReferenceMarker referenceMarker, CameraScreenAdapter cameraAdapter)
{
despawnXPosition = despawnX;
isInitialized = true;
// Load settings
settings = GameManager.GetSettingsObject<IBirdPooperSettings>();
if (settings == null)
{
Debug.LogError($"[{GetType().Name}] BirdPooperSettings not found!");
}
// Tag all child GameObjects with colliders
TagChildCollidersRecursive(transform);
// Find and set all colliders to trigger (we use OnTriggerEnter2D)
Collider2D[] colliders = GetComponentsInChildren<Collider2D>(true);
foreach (Collider2D col in colliders)
{
if (!col.isTrigger)
{
col.isTrigger = true;
Debug.Log($"[{GetType().Name}] Set collider '{col.name}' to trigger");
}
}
// Configure and update EdgeAnchor
edgeAnchor = GetComponent<EdgeAnchor>();
if (edgeAnchor != null)
{
// Assign references from spawner
edgeAnchor.referenceMarker = referenceMarker;
edgeAnchor.cameraAdapter = cameraAdapter;
// Only allow Top, Middle, or Bottom anchoring
if (verticalAnchor == EdgeAnchor.AnchorEdge.Left || verticalAnchor == EdgeAnchor.AnchorEdge.Right)
{
Debug.LogWarning($"[{GetType().Name}] Invalid anchor edge (Left/Right not supported). Defaulting to Middle.");
verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
}
edgeAnchor.anchorEdge = verticalAnchor;
edgeAnchor.useReferenceMargin = false; // No custom offset
edgeAnchor.customMargin = 0f;
edgeAnchor.preserveOtherAxes = true; // Keep X position (for scrolling)
edgeAnchor.accountForObjectSize = true;
// Trigger position update
edgeAnchor.UpdatePosition();
Debug.Log($"[{GetType().Name}] EdgeAnchor configured to {verticalAnchor} at position {transform.position}");
}
else
{
Debug.LogError($"[{GetType().Name}] EdgeAnchor component not found! Make sure the prefab has an EdgeAnchor component.");
}
Debug.Log($"[{GetType().Name}] Initialized at position {transform.position} with despawn X: {despawnX}");
}
/// <summary>
/// Recursively tag all GameObjects with Collider2D for collision detection.
/// Subclasses override GetColliderTag() to specify their tag.
/// </summary>
protected virtual void TagChildCollidersRecursive(Transform current)
{
string tagToApply = GetColliderTag();
// Tag this GameObject if it has a collider
Collider2D col = current.GetComponent<Collider2D>();
if (col != null && !current.CompareTag(tagToApply))
{
current.tag = tagToApply;
Debug.Log($"[{GetType().Name}] Tagged '{current.name}' as {tagToApply}");
}
// Recurse to children
foreach (Transform child in current)
{
TagChildCollidersRecursive(child);
}
}
#if UNITY_EDITOR
/// <summary>
/// Called when values are changed in the Inspector (Editor only).
/// Updates EdgeAnchor configuration to match entity settings.
/// </summary>
protected virtual void OnValidate()
{
// Only run in editor, not during play mode
if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode)
return;
EdgeAnchor anchor = GetComponent<EdgeAnchor>();
if (anchor != null)
{
// Auto-find and assign references if not set (for editor-time visual updates)
if (anchor.referenceMarker == null)
{
anchor.referenceMarker = FindAnyObjectByType<ScreenReferenceMarker>();
if (anchor.referenceMarker == null)
{
Debug.LogWarning($"[{GetType().Name}] No ScreenReferenceMarker found in scene. EdgeAnchor positioning won't work in editor.");
}
}
if (anchor.cameraAdapter == null)
{
anchor.cameraAdapter = FindAnyObjectByType<CameraScreenAdapter>();
// CameraScreenAdapter is optional - EdgeAnchor can auto-find camera
}
// Validate and set anchor edge
if (verticalAnchor == EdgeAnchor.AnchorEdge.Left || verticalAnchor == EdgeAnchor.AnchorEdge.Right)
{
Debug.LogWarning($"[{GetType().Name}] Invalid anchor edge (Left/Right not supported). Defaulting to Middle.");
verticalAnchor = EdgeAnchor.AnchorEdge.Middle;
}
// Configure EdgeAnchor to match entity settings
anchor.anchorEdge = verticalAnchor;
anchor.useReferenceMargin = false;
anchor.customMargin = 0f;
anchor.preserveOtherAxes = true;
anchor.accountForObjectSize = true;
// Mark as dirty so Unity saves the changes
UnityEditor.EditorUtility.SetDirty(anchor);
}
// Tag all child GameObjects with colliders
TagChildCollidersRecursiveEditor(transform);
}
/// <summary>
/// Editor version of recursive tagging for child colliders.
/// </summary>
protected virtual void TagChildCollidersRecursiveEditor(Transform current)
{
string tagToApply = GetColliderTag();
// Tag this GameObject if it has a collider
Collider2D col = current.GetComponent<Collider2D>();
if (col != null && !current.CompareTag(tagToApply))
{
current.tag = tagToApply;
UnityEditor.EditorUtility.SetDirty(current.gameObject);
}
// Recurse to children
foreach (Transform child in current)
{
TagChildCollidersRecursiveEditor(child);
}
}
#endif
protected virtual void Update()
{
if (!isInitialized || settings == null) return;
MoveLeft();
CheckBounds();
}
/// <summary>
/// Move entity left at constant speed (manual movement, no physics).
/// Override GetMoveSpeed() to customize speed per entity type.
/// </summary>
protected virtual void MoveLeft()
{
transform.position += Vector3.left * (GetMoveSpeed() * Time.deltaTime);
}
/// <summary>
/// Check if entity has passed despawn position and destroy if so.
/// </summary>
protected virtual void CheckBounds()
{
if (transform.position.x < despawnXPosition)
{
Debug.Log($"[{GetType().Name}] Reached despawn position, destroying at X: {transform.position.x}");
Destroy(gameObject);
}
}
/// <summary>
/// Get the move speed for this entity type.
/// Subclasses override to return appropriate speed from settings.
/// </summary>
protected abstract float GetMoveSpeed();
/// <summary>
/// Get the tag to apply to colliders for this entity type.
/// Subclasses override to return "Obstacle", "Target", etc.
/// </summary>
protected abstract string GetColliderTag();
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 69a3d32fc5cf4789a5e6e8dbc5f64996
timeCreated: 1763713709

View File

@@ -0,0 +1,117 @@
using UnityEngine;
using UnityEngine.Events;
using AppleHillsCamera;
namespace Minigames.BirdPooper
{
/// <summary>
/// Target entity for Bird Pooper minigame.
/// Inherits scrolling, anchoring, and despawn behavior from ScrollingEntity.
/// Can be hit by poop projectiles for scoring. Player still dies on collision.
/// </summary>
public class Target : ScrollingEntity
{
[Header("Visual Feedback")]
[SerializeField] private SpriteRenderer spriteRenderer;
[SerializeField] private Color hitColor = Color.green;
[Header("Events")]
public UnityEvent onTargetHit;
private bool isHit;
/// <summary>
/// Initialize target and set up event.
/// </summary>
public override void Initialize(float despawnX, ScreenReferenceMarker referenceMarker, CameraScreenAdapter cameraAdapter)
{
base.Initialize(despawnX, referenceMarker, cameraAdapter);
isHit = false;
// Initialize event
if (onTargetHit == null)
{
onTargetHit = new UnityEvent();
}
// Find and set all colliders to trigger (we use OnTriggerEnter2D)
Collider2D[] colliders = GetComponentsInChildren<Collider2D>(true);
foreach (Collider2D col in colliders)
{
if (!col.isTrigger)
{
col.isTrigger = true;
Debug.Log($"[Target] Set collider '{col.name}' to trigger");
}
}
}
/// <summary>
/// Override Update to stop movement when hit.
/// </summary>
protected override void Update()
{
if (isHit) return; // Don't move or check bounds if hit
base.Update();
}
/// <summary>
/// Returns target move speed from settings.
/// </summary>
protected override float GetMoveSpeed()
{
return settings != null ? settings.TargetMoveSpeed : 4f;
}
/// <summary>
/// Returns "Target" tag for collision detection.
/// </summary>
protected override string GetColliderTag()
{
return "Target";
}
/// <summary>
/// Trigger collision detection for both player and projectiles.
/// Single trigger collider handles both cases.
/// </summary>
private void OnTriggerEnter2D(Collider2D other)
{
// Check for projectile collision
if (other.CompareTag("Projectile") && !isHit)
{
OnHitByProjectile();
}
// Player collision is handled by BirdPlayerController's OnTriggerEnter2D
// (both have trigger colliders, so trigger occurs naturally)
}
/// <summary>
/// Called when target is hit by a poop projectile.
/// Shows visual feedback and notifies manager.
/// </summary>
public void OnHitByProjectile()
{
if (isHit) return;
isHit = true;
// Visual feedback
if (spriteRenderer != null)
{
spriteRenderer.color = hitColor;
}
// Notify manager
onTargetHit?.Invoke();
Debug.Log($"[Target] Hit by projectile at position {transform.position}");
// Destroy after brief delay for visual feedback
Destroy(gameObject, 0.2f);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5331a770bc634a738b82f9450441de12
timeCreated: 1763713776

View File

@@ -0,0 +1,198 @@
using UnityEngine;
using Core;
using Core.Settings;
using Core.Lifecycle;
using AppleHillsCamera;
namespace Minigames.BirdPooper
{
/// <summary>
/// Spawns targets at regular intervals for Bird Pooper minigame.
/// Uses Transform references for spawn and despawn positions.
/// All targets are spawned at Y = 0 (EdgeAnchor positions them vertically).
/// </summary>
public class TargetSpawner : ManagedBehaviour
{
[Header("Spawn Configuration")]
[Tooltip("Transform marking where targets spawn (off-screen right)")]
[SerializeField] private Transform spawnPoint;
[Tooltip("Transform marking where targets despawn (off-screen left)")]
[SerializeField] private Transform despawnPoint;
[Header("EdgeAnchor References")]
[Tooltip("ScreenReferenceMarker to pass to spawned targets")]
[SerializeField] private ScreenReferenceMarker referenceMarker;
[Tooltip("CameraScreenAdapter to pass to spawned targets")]
[SerializeField] private CameraScreenAdapter cameraAdapter;
[Header("Target Prefabs")]
[Tooltip("Array of target prefabs to spawn randomly")]
[SerializeField] private GameObject[] targetPrefabs;
private IBirdPooperSettings settings;
private float spawnTimer;
private bool isSpawning;
internal override void OnManagedAwake()
{
base.OnManagedAwake();
// Load settings
settings = GameManager.GetSettingsObject<IBirdPooperSettings>();
if (settings == null)
{
Debug.LogError("[TargetSpawner] BirdPooperSettings not found!");
return;
}
// Validate references
if (spawnPoint == null)
{
Debug.LogError("[TargetSpawner] Spawn Point not assigned! Please assign a Transform in the Inspector.");
}
if (despawnPoint == null)
{
Debug.LogError("[TargetSpawner] Despawn Point not assigned! Please assign a Transform in the Inspector.");
}
if (targetPrefabs == null || targetPrefabs.Length == 0)
{
Debug.LogError("[TargetSpawner] No target prefabs assigned! Please assign at least one prefab in the Inspector.");
}
if (referenceMarker == null)
{
Debug.LogError("[TargetSpawner] ScreenReferenceMarker not assigned! Targets need this for EdgeAnchor positioning.");
}
if (cameraAdapter == null)
{
Debug.LogWarning("[TargetSpawner] CameraScreenAdapter not assigned. EdgeAnchor will attempt to auto-find camera.");
}
Debug.Log("[TargetSpawner] Initialized successfully");
}
private void Update()
{
if (!isSpawning || settings == null)
return;
spawnTimer += Time.deltaTime;
if (spawnTimer >= settings.TargetSpawnInterval)
{
SpawnTarget();
spawnTimer = 0f;
}
}
/// <summary>
/// Spawns a random target prefab at the spawn point.
/// Target is spawned at Y = 0, EdgeAnchor will position it vertically.
/// </summary>
private void SpawnTarget()
{
if (targetPrefabs == null || targetPrefabs.Length == 0 || spawnPoint == null)
{
Debug.LogError("[TargetSpawner] Cannot spawn target - missing prefabs or spawn point!");
return;
}
// Randomly select target prefab
GameObject prefab = targetPrefabs[Random.Range(0, targetPrefabs.Length)];
// Spawn at spawn point X, but Y = 0 (EdgeAnchor will position vertically)
Vector3 spawnPosition = new Vector3(spawnPoint.position.x, 0f, 0f);
GameObject targetObj = Instantiate(prefab, spawnPosition, Quaternion.identity);
// Initialize target
Target target = targetObj.GetComponent<Target>();
if (target != null)
{
float despawnX = despawnPoint != null ? despawnPoint.position.x : -12f;
target.Initialize(despawnX, referenceMarker, cameraAdapter);
// Subscribe to target hit event to notify manager
target.onTargetHit.AddListener(OnTargetHit);
Debug.Log($"[TargetSpawner] Spawned target at {spawnPosition}");
}
else
{
Debug.LogError($"[TargetSpawner] Spawned prefab '{prefab.name}' does not have Target component!");
Destroy(targetObj);
}
}
/// <summary>
/// Called when a target is hit by a projectile.
/// Notifies the game manager for score tracking.
/// </summary>
private void OnTargetHit()
{
// Find and notify manager
BirdPooperGameManager manager = BirdPooperGameManager.Instance;
if (manager != null)
{
manager.OnTargetHit();
}
else
{
Debug.LogWarning("[TargetSpawner] BirdPooperGameManager not found!");
}
}
/// <summary>
/// Start spawning targets at regular intervals.
/// </summary>
public void StartSpawning()
{
isSpawning = true;
spawnTimer = 0f;
Debug.Log("[TargetSpawner] Started spawning targets");
}
/// <summary>
/// Stop spawning new targets (existing targets continue).
/// </summary>
public void StopSpawning()
{
isSpawning = false;
Debug.Log("[TargetSpawner] Stopped spawning targets");
}
/// <summary>
/// Check if spawner is currently spawning.
/// </summary>
public bool IsSpawning => isSpawning;
/// <summary>
/// Draw gizmos to visualize spawn and despawn points in the editor.
/// </summary>
private void OnDrawGizmos()
{
if (spawnPoint != null)
{
Gizmos.color = Color.cyan;
Gizmos.DrawLine(
new Vector3(spawnPoint.position.x, -10f, 0f),
new Vector3(spawnPoint.position.x, 10f, 0f)
);
}
if (despawnPoint != null)
{
Gizmos.color = Color.magenta;
Gizmos.DrawLine(
new Vector3(despawnPoint.position.x, -10f, 0f),
new Vector3(despawnPoint.position.x, 10f, 0f)
);
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 16beae843b5f431f9256a56aab02b53d
timeCreated: 1763713803

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5596931aef9448a3b369f7917af07797
timeCreated: 1763745490

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 34525368248b48e0b271537891123818
timeCreated: 1763745579

View File

@@ -0,0 +1,333 @@
using System.Collections.Generic;
using Core;
using Core.Lifecycle;
using Minigames.StatueDressup.Data;
using Minigames.StatueDressup.DragDrop;
using UnityEngine;
using UnityEngine.UI;
namespace Minigames.StatueDressup.Controllers
{
/// <summary>
/// Manages the side menu with decoration items and pagination
/// </summary>
public class DecorationMenuController : ManagedBehaviour
{
[Header("References")]
[SerializeField] private DecorationGridIcon iconPrefab;
[SerializeField] private DecorationDraggableInstance draggablePrefab;
[SerializeField] private Transform itemsContainer;
[SerializeField] private Transform draggableContainer; // Parent for spawned draggables
[SerializeField] private Button nextPageButton;
[SerializeField] private Button previousPageButton;
[SerializeField] private StatueDecorationController statueController; // Controller for registration
[SerializeField] private Image statueOutline; // Outline image shown during drag to indicate valid drop area
[Header("Layout")]
[SerializeField] private GridLayoutGroup gridLayout;
private int _currentPage;
private int _totalPages;
private List<DecorationGridIcon> _spawnedIcons = new List<DecorationGridIcon>();
private AppleHills.Core.Settings.IStatueDressupSettings _settings;
// Properties
public int CurrentPage => _currentPage;
public int TotalPages => _totalPages;
/// <summary>
/// Early initialization - get settings reference
/// </summary>
internal override void OnManagedAwake()
{
base.OnManagedAwake();
// Get settings early
_settings = GameManager.GetSettingsObject<AppleHills.Core.Settings.IStatueDressupSettings>();
if (_settings == null)
{
Logging.Error("[DecorationMenuController] Failed to load StatueDressupSettings!");
}
}
/// <summary>
/// Main initialization after all managers are ready
/// </summary>
internal override void OnManagedStart()
{
base.OnManagedStart();
if (_settings == null)
{
Logging.Error("[DecorationMenuController] Cannot initialize without settings!");
return;
}
// Ensure outline starts hidden
if (statueOutline != null)
{
statueOutline.gameObject.SetActive(false);
}
var allDecorations = _settings.AllDecorations;
int itemsPerPage = _settings.ItemsPerPage;
Logging.Debug($"[DecorationMenuController] Initializing with {allDecorations?.Count ?? 0} decorations");
// Calculate total pages
if (allDecorations != null && allDecorations.Count > 0)
{
_totalPages = Mathf.CeilToInt((float)allDecorations.Count / itemsPerPage);
Logging.Debug($"[DecorationMenuController] Total pages: {_totalPages}");
}
else
{
Logging.Warning("[DecorationMenuController] No decorations found in settings!");
_totalPages = 0;
}
// Setup buttons
if (nextPageButton != null)
{
nextPageButton.onClick.AddListener(OnNextPage);
}
if (previousPageButton != null)
{
previousPageButton.onClick.AddListener(OnPreviousPage);
}
// Subscribe to drag events for all items
// (will be handled per-item when spawned)
// Populate first page
PopulateCurrentPage();
}
/// <summary>
/// Populate the current page with decoration icons
/// </summary>
private void PopulateCurrentPage()
{
if (_settings == null) return;
var allDecorations = _settings.AllDecorations;
int itemsPerPage = _settings.ItemsPerPage;
if (allDecorations == null || allDecorations.Count == 0)
{
Logging.Warning("[DecorationMenuController] No decorations to populate");
return;
}
Logging.Debug($"[DecorationMenuController] Populating page {_currentPage + 1}/{_totalPages}");
// Clear existing icons
ClearIcons();
// Calculate range for current page
int startIndex = _currentPage * itemsPerPage;
int endIndex = Mathf.Min(startIndex + itemsPerPage, allDecorations.Count);
Logging.Debug($"[DecorationMenuController] Spawning icons {startIndex} to {endIndex - 1}");
// Spawn icons for this page
for (int i = startIndex; i < endIndex; i++)
{
SpawnGridIcon(allDecorations[i]);
}
// Update button states
UpdateNavigationButtons();
}
/// <summary>
/// Spawn a grid icon in the menu
/// </summary>
private void SpawnGridIcon(DecorationData data)
{
if (iconPrefab == null || itemsContainer == null)
{
Logging.Warning("[DecorationMenuController] Missing icon prefab or container");
return;
}
DecorationGridIcon icon = Instantiate(iconPrefab, itemsContainer);
icon.Initialize(data, this);
_spawnedIcons.Add(icon);
Logging.Debug($"[DecorationMenuController] Spawned icon: {data.DecorationName}");
}
/// <summary>
/// Factory method: Spawn a draggable instance at cursor position
/// Called by DecorationGridIcon when drag starts
/// </summary>
public DecorationDraggableInstance SpawnDraggableInstance(DecorationData data, Vector3 screenPosition)
{
if (draggablePrefab == null || statueController == null)
{
Logging.Warning("[DecorationMenuController] Missing draggable prefab or statue controller");
return null;
}
// Show statue outline
ShowStatueOutline();
// Determine parent - use draggableContainer if set, otherwise itemsContainer's parent
Transform parent = draggableContainer != null ? draggableContainer : itemsContainer.parent;
// Spawn draggable instance
DecorationDraggableInstance instance = Instantiate(draggablePrefab, parent);
// Get outline RectTransform for overlap detection
RectTransform outlineRect = statueOutline != null ? statueOutline.rectTransform : null;
// Initialize with references
instance.Initialize(
data,
outlineRect,
statueController.StatueParent,
statueController,
_settings,
OnDraggableFinished
);
// Position at cursor (in local space)
Canvas canvas = GetComponentInParent<Canvas>();
if (canvas != null)
{
RectTransformUtility.ScreenPointToLocalPointInRectangle(
canvas.transform as RectTransform,
screenPosition,
canvas.worldCamera,
out Vector2 localPoint);
RectTransform instanceRect = instance.GetComponent<RectTransform>();
if (instanceRect != null)
{
instanceRect.localPosition = localPoint;
}
}
Logging.Debug($"[DecorationMenuController] Spawned draggable instance: {data.DecorationName}");
return instance;
}
/// <summary>
/// Show the statue outline to indicate valid drop area
/// </summary>
private void ShowStatueOutline()
{
if (statueOutline != null)
{
statueOutline.gameObject.SetActive(true);
Logging.Debug("[DecorationMenuController] Statue outline shown");
}
}
/// <summary>
/// Hide the statue outline after drag ends
/// </summary>
private void HideStatueOutline()
{
if (statueOutline != null)
{
statueOutline.gameObject.SetActive(false);
Logging.Debug("[DecorationMenuController] Statue outline hidden");
}
}
/// <summary>
/// Callback from DecorationDraggableInstance when drag finishes
/// </summary>
private void OnDraggableFinished()
{
HideStatueOutline();
}
/// <summary>
/// Clear all spawned icons
/// </summary>
private void ClearIcons()
{
foreach (var icon in _spawnedIcons)
{
if (icon != null)
{
Destroy(icon.gameObject);
}
}
_spawnedIcons.Clear();
}
/// <summary>
/// Navigate to next page
/// </summary>
private void OnNextPage()
{
if (_currentPage < _totalPages - 1)
{
_currentPage++;
PopulateCurrentPage();
Logging.Debug($"[DecorationMenuController] Next page: {_currentPage + 1}/{_totalPages}");
}
}
/// <summary>
/// Navigate to previous page
/// </summary>
private void OnPreviousPage()
{
if (_currentPage > 0)
{
_currentPage--;
PopulateCurrentPage();
Logging.Debug($"[DecorationMenuController] Previous page: {_currentPage + 1}/{_totalPages}");
}
}
/// <summary>
/// Update navigation button interactability
/// </summary>
private void UpdateNavigationButtons()
{
if (previousPageButton != null)
{
previousPageButton.interactable = _currentPage > 0;
}
if (nextPageButton != null)
{
nextPageButton.interactable = _currentPage < _totalPages - 1;
}
}
/// <summary>
/// Cleanup when menu controller is destroyed
/// </summary>
internal override void OnManagedDestroy()
{
base.OnManagedDestroy();
// Cleanup button listeners
if (nextPageButton != null)
{
nextPageButton.onClick.RemoveListener(OnNextPage);
}
if (previousPageButton != null)
{
previousPageButton.onClick.RemoveListener(OnPreviousPage);
}
// Cleanup icons
ClearIcons();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: acbd542762b44e719326dff6c3a69e6e
timeCreated: 1763745579

View File

@@ -0,0 +1,307 @@
using System.Collections.Generic;
using Core;
using Core.Lifecycle;
using Minigames.StatueDressup.DragDrop;
using UnityEngine;
using UnityEngine.UI;
namespace Minigames.StatueDressup.Controllers
{
/// <summary>
/// Main controller for the Mr. Cement statue decoration minigame
/// Uses overlap-based placement instead of slots
/// </summary>
public class StatueDecorationController : ManagedBehaviour
{
[Header("References")]
[SerializeField] private RectTransform statueArea; // Statue area for overlap detection
[SerializeField] private Transform statueParent; // Parent for placed decorations
[SerializeField] private DecorationMenuController menuController;
[SerializeField] private Button takePhotoButton;
[SerializeField] private GameObject statue;
[Header("UI Elements to Hide for Photo")]
[SerializeField] private GameObject[] uiElementsToHideForPhoto;
[Header("Photo Settings")]
[SerializeField] private RectTransform photoArea; // Area to capture
[SerializeField] private string photoSaveKey = "MrCementStatuePhoto";
private List<DecorationDraggableInstance> _placedDecorations = new List<DecorationDraggableInstance>();
private bool _minigameCompleted;
private AppleHills.Core.Settings.IStatueDressupSettings _settings;
// Public property for menu controller
public Transform StatueParent => statueParent;
/// <summary>
/// Early initialization - get settings reference
/// </summary>
internal override void OnManagedAwake()
{
base.OnManagedAwake();
// Get settings early
_settings = GameManager.GetSettingsObject<AppleHills.Core.Settings.IStatueDressupSettings>();
}
/// <summary>
/// Main initialization after all managers are ready
/// </summary>
internal override void OnManagedStart()
{
base.OnManagedStart();
Logging.Debug("[StatueDecorationController] Initializing minigame");
// Setup photo button
if (takePhotoButton != null)
{
takePhotoButton.onClick.AddListener(OnTakePhoto);
}
// Subscribe to menu controller for tracking placed items
// Items will manage their own placement via overlap detection
if (menuController != null)
{
// Menu controller will handle spawning replacements
Logging.Debug("[StatueDecorationController] Menu controller connected");
}
// Load saved state if exists
LoadStatueState();
}
/// <summary>
/// Register a decoration as placed on statue
/// </summary>
public void RegisterDecoration(DecorationDraggableInstance decoration)
{
if (decoration != null && !_placedDecorations.Contains(decoration))
{
_placedDecorations.Add(decoration);
Logging.Debug($"[StatueDecorationController] Decoration placed: {decoration.Data?.DecorationName}");
// Auto-save state
SaveStatueState();
}
}
/// <summary>
/// Unregister a decoration (when removed)
/// </summary>
public void UnregisterDecoration(DecorationDraggableInstance decoration)
{
if (decoration != null && _placedDecorations.Contains(decoration))
{
_placedDecorations.Remove(decoration);
Logging.Debug($"[StatueDecorationController] Decoration removed: {decoration.Data?.DecorationName}");
// Auto-save state
SaveStatueState();
}
}
/// <summary>
/// Take photo of decorated statue
/// </summary>
private void OnTakePhoto()
{
if (_minigameCompleted)
{
Logging.Debug("[StatueDecorationController] Minigame already completed");
return;
}
Logging.Debug("[StatueDecorationController] Taking photo of statue");
// Hide UI elements
HideUIForPhoto(true);
// Wait a frame for UI to hide, then capture
StartCoroutine(CapturePhotoCoroutine());
}
/// <summary>
/// Capture photo after UI is hidden
/// </summary>
private System.Collections.IEnumerator CapturePhotoCoroutine()
{
yield return new WaitForEndOfFrame();
// Capture the photo area
Texture2D photo = CaptureScreenshotArea();
if (photo != null)
{
// Save photo to album
SavePhotoToAlbum(photo);
// Award cards
AwardCards();
// Update town icon
UpdateTownIcon(photo);
// Show completion feedback
ShowCompletionFeedback();
_minigameCompleted = true;
}
// Restore UI
HideUIForPhoto(false);
}
/// <summary>
/// Capture screenshot of specific area
/// </summary>
private Texture2D CaptureScreenshotArea()
{
if (photoArea == null)
{
Logging.Warning("[StatueDecorationController] No photo area specified, capturing full screen");
// Capture full screen
Texture2D screenshot = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
screenshot.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
screenshot.Apply();
return screenshot;
}
// Get world corners of the rect
Vector3[] corners = new Vector3[4];
photoArea.GetWorldCorners(corners);
// Convert to screen space
Vector2 min = RectTransformUtility.WorldToScreenPoint(Camera.main, corners[0]);
Vector2 max = RectTransformUtility.WorldToScreenPoint(Camera.main, corners[2]);
int width = (int)(max.x - min.x);
int height = (int)(max.y - min.y);
Logging.Debug($"[StatueDecorationController] Capturing area: {width}x{height} at ({min.x}, {min.y})");
// Capture the specified area
Texture2D areaScreenshot = new Texture2D(width, height, TextureFormat.RGB24, false);
areaScreenshot.ReadPixels(new Rect(min.x, min.y, width, height), 0, 0);
areaScreenshot.Apply();
return areaScreenshot;
}
/// <summary>
/// Save photo to card album
/// </summary>
private void SavePhotoToAlbum(Texture2D photo)
{
// TODO: Integrate with existing album save system
// For now, save to PlayerPrefs as base64
byte[] bytes = photo.EncodeToPNG();
string base64 = System.Convert.ToBase64String(bytes);
string saveKey = _settings?.PhotoSaveKey ?? photoSaveKey;
PlayerPrefs.SetString(saveKey, base64);
PlayerPrefs.Save();
Logging.Debug("[StatueDecorationController] Photo saved to album");
}
/// <summary>
/// Award Blokkemon cards to player
/// </summary>
private void AwardCards()
{
// TODO: Integrate with MinigameBoosterGiver
// MinigameBoosterGiver.GiveBooster();
Logging.Debug("[StatueDecorationController] Cards awarded (TODO: implement)");
}
/// <summary>
/// Update town menu icon with decorated statue
/// </summary>
private void UpdateTownIcon(Texture2D photo)
{
// TODO: Integrate with town system
// TownIconUpdater.SetStatueIcon(photo);
Logging.Debug("[StatueDecorationController] Town icon updated (TODO: implement)");
}
/// <summary>
/// Show completion feedback to player
/// </summary>
private void ShowCompletionFeedback()
{
// TODO: Show success message/animation
DebugUIMessage.Show("Photo captured! Mr. Cement looks amazing!", Color.green);
Logging.Debug("[StatueDecorationController] Minigame completed!");
}
/// <summary>
/// Hide/show UI elements for photo
/// </summary>
private void HideUIForPhoto(bool hide)
{
foreach (var element in uiElementsToHideForPhoto)
{
if (element != null)
{
element.SetActive(!hide);
}
}
}
/// <summary>
/// Save current statue decoration state
/// </summary>
private void SaveStatueState()
{
// Check if persistence is enabled
if (_settings == null || !_settings.EnableStatePersistence)
{
Logging.Debug("[StatueDecorationController] State persistence disabled");
return;
}
// TODO: Implement save system
// Save decoration ID + position + rotation for each placed item
// Respect MaxSavedDecorations limit
Logging.Debug($"[StatueDecorationController] State saved to {_settings.StateSaveKey} (TODO: implement persistence)");
}
/// <summary>
/// Load saved statue decoration state
/// </summary>
private void LoadStatueState()
{
// Check if persistence is enabled
if (_settings == null || !_settings.EnableStatePersistence)
{
Logging.Debug("[StatueDecorationController] State persistence disabled");
return;
}
// TODO: Implement load system
// Restore decorations from saved state
Logging.Debug($"[StatueDecorationController] State loaded from {_settings.StateSaveKey} (TODO: implement persistence)");
}
/// <summary>
/// Cleanup when controller is destroyed
/// </summary>
internal override void OnManagedDestroy()
{
base.OnManagedDestroy();
// Cleanup button listener
if (takePhotoButton != null)
{
takePhotoButton.onClick.RemoveListener(OnTakePhoto);
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 19e312ceaffa40ae90ac87b8209319cb
timeCreated: 1763745610

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a6e7dfb0a39c441fb8ac888a5e58a91e
timeCreated: 1763745500

View File

@@ -0,0 +1,42 @@
using UnityEngine;
namespace Minigames.StatueDressup.Data
{
/// <summary>
/// ScriptableObject data definition for statue decorations
/// </summary>
[CreateAssetMenu(fileName = "DecorationData", menuName = "AppleHills/Minigames/Decoration Data", order = 1)]
public class DecorationData : ScriptableObject
{
[Header("Identity")]
[SerializeField] private string decorationId;
[SerializeField] private string decorationName;
[Header("Visual")]
[SerializeField] private Sprite decorationSprite;
[Header("Size Configuration")]
[Tooltip("Full size when placed on statue (actual sprite size)")]
[SerializeField] private Vector2 authoredSize = new Vector2(128f, 128f);
[Header("Progression (Optional)")]
[SerializeField] private bool isUnlocked = true;
// Properties
public string DecorationId => decorationId;
public string DecorationName => decorationName;
public Sprite DecorationSprite => decorationSprite;
public Vector2 AuthoredSize => authoredSize;
public bool IsUnlocked => isUnlocked;
private void OnValidate()
{
// Auto-generate ID from name if empty
if (string.IsNullOrEmpty(decorationId) && !string.IsNullOrEmpty(decorationName))
{
decorationId = decorationName.Replace(" ", "_").ToLower();
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 74c6ae9aa803480c8fb918dd58cfb809
timeCreated: 1763745511

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4c3389a935534b7b86800516ffa42acb
timeCreated: 1763745531

View File

@@ -0,0 +1,242 @@
using Core;
using Minigames.StatueDressup.Controllers;
using Minigames.StatueDressup.Data;
using Minigames.StatueDressup.Utils;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Minigames.StatueDressup.DragDrop
{
/// <summary>
/// Draggable instance of a decoration that can be placed on the statue.
/// Created dynamically when dragging from menu or picking up from statue.
/// Destroyed if dropped outside statue area.
/// </summary>
public class DecorationDraggableInstance : MonoBehaviour
{
[Header("References")]
[SerializeField] private Image decorationImage;
[SerializeField] private CanvasGroup canvasGroup;
private DecorationData _decorationData;
private RectTransform _rectTransform;
private Canvas _canvas;
private RectTransform _statueOutline;
private Transform _statueParent;
private StatueDecorationController _controller;
private AppleHills.Core.Settings.IStatueDressupSettings _settings;
private System.Action _onFinishedCallback;
private bool _isDragging;
private bool _isPlacedOnStatue;
private Vector3 _dragOffset;
// Properties
public DecorationData Data => _decorationData;
public bool IsPlacedOnStatue => _isPlacedOnStatue;
private void Awake()
{
_rectTransform = GetComponent<RectTransform>();
_canvas = GetComponentInParent<Canvas>();
if (canvasGroup == null)
{
canvasGroup = gameObject.AddComponent<CanvasGroup>();
}
}
/// <summary>
/// Initialize the draggable instance
/// </summary>
public void Initialize(DecorationData data, RectTransform statueOutline, Transform statueParent,
StatueDecorationController controller, AppleHills.Core.Settings.IStatueDressupSettings settings,
System.Action onFinishedCallback)
{
_decorationData = data;
_statueOutline = statueOutline;
_statueParent = statueParent;
_controller = controller;
_settings = settings;
_onFinishedCallback = onFinishedCallback;
// Set sprite
if (decorationImage != null && data != null && data.DecorationSprite != null)
{
decorationImage.sprite = data.DecorationSprite;
}
// Set authored size
if (_rectTransform != null && data != null)
{
_rectTransform.sizeDelta = data.AuthoredSize;
}
Logging.Debug($"[DecorationDraggableInstance] Initialized: {data?.DecorationName}");
}
/// <summary>
/// Start dragging from icon
/// </summary>
public void StartDragFromIcon(PointerEventData eventData)
{
_isDragging = true;
// Calculate offset from cursor to object center
RectTransformUtility.ScreenPointToLocalPointInRectangle(
_canvas.transform as RectTransform,
eventData.position,
eventData.pressEventCamera,
out Vector2 localPoint);
_dragOffset = _rectTransform.localPosition - (Vector3)localPoint;
Logging.Debug($"[DecorationDraggableInstance] Started drag from icon: {_decorationData?.DecorationName}");
}
/// <summary>
/// Continue dragging
/// </summary>
public void ContinueDrag(PointerEventData eventData)
{
if (!_isDragging) return;
// Update position to follow cursor
RectTransformUtility.ScreenPointToLocalPointInRectangle(
_canvas.transform as RectTransform,
eventData.position,
eventData.pressEventCamera,
out Vector2 localPoint);
_rectTransform.localPosition = localPoint + (Vector2)_dragOffset;
}
/// <summary>
/// End drag - check placement
/// </summary>
public void EndDrag(PointerEventData eventData)
{
_isDragging = false;
Logging.Debug($"[DecorationDraggableInstance] Drag ended: {_decorationData?.DecorationName}");
// Check if overlapping with statue
if (IsOverlappingStatue())
{
PlaceOnStatue();
}
else
{
PlayPopOutAndDestroy();
}
}
/// <summary>
/// Check if item overlaps with statue outline
/// </summary>
private bool IsOverlappingStatue()
{
if (_statueOutline == null || _rectTransform == null)
{
Logging.Warning($"[DecorationDraggableInstance] Cannot check overlap - statueOutline or RectTransform is null");
return false;
}
// Get bounds of this item in world space
Rect itemRect = GetWorldRect(_rectTransform);
Rect outlineRect = GetWorldRect(_statueOutline);
// Check for any overlap
bool overlaps = itemRect.Overlaps(outlineRect);
Logging.Debug($"[DecorationDraggableInstance] Overlap check: {_decorationData?.DecorationName}, overlaps={overlaps}");
return overlaps;
}
/// <summary>
/// Get world space rect for a RectTransform
/// </summary>
private Rect GetWorldRect(RectTransform rectTransform)
{
Vector3[] corners = new Vector3[4];
rectTransform.GetWorldCorners(corners);
Vector3 bottomLeft = corners[0];
Vector3 topRight = corners[2];
return new Rect(bottomLeft.x, bottomLeft.y, topRight.x - bottomLeft.x, topRight.y - bottomLeft.y);
}
/// <summary>
/// Place item on statue at current position
/// </summary>
private void PlaceOnStatue()
{
Logging.Debug($"[DecorationDraggableInstance] Placing on statue: {_decorationData?.DecorationName}");
_isPlacedOnStatue = true;
// Move to statue parent if specified
if (_statueParent != null && transform.parent != _statueParent)
{
transform.SetParent(_statueParent, true); // Keep world position
}
// Register with controller
if (_controller != null)
{
_controller.RegisterDecoration(this);
}
// Notify menu controller to hide outline
_onFinishedCallback?.Invoke();
}
/// <summary>
/// Play pop-out animation and destroy
/// </summary>
private void PlayPopOutAndDestroy()
{
Logging.Debug($"[DecorationDraggableInstance] Pop-out and destroy: {_decorationData?.DecorationName}");
// Notify menu controller to hide outline immediately
_onFinishedCallback?.Invoke();
float duration = _settings?.PlacementAnimationDuration ?? 0.3f;
// Play pop-out with fade animation
TweenAnimationUtility.PopOutWithFade(transform, canvasGroup, duration, () =>
{
Destroy(gameObject);
});
}
/// <summary>
/// Allow picking up from statue for repositioning
/// </summary>
public void StartDragFromStatue(Vector3 pointerPosition)
{
if (_controller != null)
{
_controller.UnregisterDecoration(this);
}
_isPlacedOnStatue = false;
_isDragging = true;
// Calculate offset
RectTransformUtility.ScreenPointToLocalPointInRectangle(
_canvas.transform as RectTransform,
pointerPosition,
null,
out Vector2 localPoint);
_dragOffset = _rectTransform.localPosition - (Vector3)localPoint;
Logging.Debug($"[DecorationDraggableInstance] Started drag from statue: {_decorationData?.DecorationName}");
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e4659fd035c74a79af0311de9e17f44a
timeCreated: 1763991638

View File

@@ -0,0 +1,100 @@
using Core;
using Minigames.StatueDressup.Data;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace Minigames.StatueDressup.DragDrop
{
/// <summary>
/// Static grid icon for decorations in the menu.
/// Handles tap and drag initiation, but doesn't move itself.
/// Spawns a draggable instance when drag starts.
/// </summary>
public class DecorationGridIcon : MonoBehaviour, IPointerClickHandler, IBeginDragHandler, IDragHandler, IEndDragHandler
{
[Header("References")]
[SerializeField] private Image iconImage;
[SerializeField] private DecorationData decorationData;
private Controllers.DecorationMenuController _menuController;
private DecorationDraggableInstance _activeDraggableInstance;
// Properties
public DecorationData Data => decorationData;
/// <summary>
/// Initialize the icon with decoration data
/// </summary>
public void Initialize(DecorationData data, Controllers.DecorationMenuController controller)
{
decorationData = data;
_menuController = controller;
if (iconImage != null && data != null && data.DecorationSprite != null)
{
iconImage.sprite = data.DecorationSprite;
}
}
/// <summary>
/// Handle tap/click on icon
/// </summary>
public void OnPointerClick(PointerEventData eventData)
{
// Only process clicks if we're not dragging
if (_activeDraggableInstance == null)
{
Logging.Debug($"[DecorationGridIcon] Item tapped: {decorationData?.DecorationName}");
// Future: Open detail view, preview, etc.
}
}
/// <summary>
/// Handle drag start - spawn draggable instance
/// </summary>
public void OnBeginDrag(PointerEventData eventData)
{
if (_menuController == null || decorationData == null)
{
Logging.Warning("[DecorationGridIcon] Cannot start drag - missing controller or data");
return;
}
Logging.Debug($"[DecorationGridIcon] Starting drag for: {decorationData.DecorationName}");
// Spawn draggable instance at cursor position
_activeDraggableInstance = _menuController.SpawnDraggableInstance(decorationData, eventData.position);
// Start the drag on the spawned instance
if (_activeDraggableInstance != null)
{
_activeDraggableInstance.StartDragFromIcon(eventData);
}
}
/// <summary>
/// Forward drag events to the active draggable instance
/// </summary>
public void OnDrag(PointerEventData eventData)
{
if (_activeDraggableInstance != null)
{
_activeDraggableInstance.ContinueDrag(eventData);
}
}
/// <summary>
/// Forward drag end to the active draggable instance
/// </summary>
public void OnEndDrag(PointerEventData eventData)
{
if (_activeDraggableInstance != null)
{
_activeDraggableInstance.EndDrag(eventData);
_activeDraggableInstance = null;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9c806d80a321498c9f33f13d7a31065c
timeCreated: 1763991611

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fe03648f638e4872abafaf49234a3f55
timeCreated: 1763745490

Some files were not shown because too many files have changed in this diff Show More