Compare commits

...

23 Commits

Author SHA1 Message Date
MacBuilder
d647bb5707 Target eliminated, good job 47 2025-11-10 15:55:28 +01:00
MacBuilder
dec7ced2d1 Began killing json 2025-11-10 14:57:42 +01:00
Michal Pikulski
c4d356886f Dumb fix for data clearing 2025-11-10 14:27:14 +01:00
Michal Pikulski
64d7f19b83 ADd clearing saves 2025-11-10 14:11:02 +01:00
ce21e8b02e Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-10 13:13:36 +01:00
f44f8c5171 Made intro VO play in diving minigame 2025-11-10 13:13:32 +01:00
9772206362 Merge pull request 'Clean up logging' (#55) from clean_up_logging into main
Reviewed-on: #55
2025-11-10 12:06:05 +00:00
Michal Pikulski
3ebbecc277 Clean up logging 2025-11-10 13:03:36 +01:00
Michal Pikulski
c99aad49f3 Save bird states 2025-11-10 12:55:27 +01:00
3fe4c6afd9 Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-10 12:53:07 +01:00
9c61065947 Fixed nullref in TakePhotoState 2025-11-10 12:53:03 +01:00
Michal Pikulski
7c09db641a Only show cards when in actual album 2025-11-10 12:41:28 +01:00
Michal Pikulski
e369660a8f Fix tab navigation on card select less wonky 2025-11-10 12:29:25 +01:00
a6e3413499 Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-10 12:19:25 +01:00
7bb992acb8 Made apple audio sources use OnManagedAwake 2025-11-10 12:19:20 +01:00
Michal Pikulski
cefa488a92 Update issues with card appearing twice after reopening page 2025-11-10 12:17:17 +01:00
9344f06886 Merge branch 'main' of https://homelab.tailf7f81b.ts.net/tschesky/AppleHillsProduction 2025-11-10 11:37:53 +01:00
af7e081c9a Fixed Chocolate Puzzle, but does not work well on load (the destroyed chocolate appears again) 2025-11-10 11:37:45 +01:00
Michal Pikulski
4a6ac7281f Udate the booster page. New card text smaller, moved down. Album icon disappears when opening boosters. 2025-11-10 11:28:23 +01:00
861797ba41 Merge pull request 'DamianBranch' (#54) from DamianBranch into main
Reviewed-on: #54
2025-11-10 10:10:40 +00:00
98883bd382 Merge branch 'main' into DamianBranch 2025-11-10 11:10:14 +01:00
Michal Pikulski
75cd70a18a Play intro audio only once 2025-11-10 11:09:06 +01:00
Michal Pikulski
252cb99884 Update icons in minigame 2025-11-10 10:41:38 +01:00
62 changed files with 1280 additions and 1694 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -0,0 +1,156 @@
fileFormatVersion: 2
guid: 57224356af3d045dbbf8b420e13b4b10
TextureImporter:
internalIDToNameTable:
- first:
213: 2364528222304962155
second: ramasjang_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: 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: 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
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: ramasjang_icon_0
rect:
serializedVersion: 2
x: 4
y: 5
width: 334
height: 334
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: b668fdfe3ed70d020800000000000000
internalID: 2364528222304962155
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
ramasjang_icon_0: 2364528222304962155
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -248,7 +248,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2bd397a60643eed45b586961ae6e3453, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::PulverAudioController
audioSource: {fileID: 887004370483616855}
combineAudio: {fileID: 8300000, guid: 768a16f348fe1d94c9cc267dc7ecf3b5, type: 3}
itemManager: {fileID: 0}
--- !u!82 &4467608046243604209
AudioSource:
m_ObjectHideFlags: 0

View File

@@ -725,10 +725,9 @@ GameObject:
m_Component:
- component: {fileID: 3864057818161790164}
- component: {fileID: 5271824036850954050}
- component: {fileID: 8081783206361873868}
- component: {fileID: 5548642987123338363}
- component: {fileID: 3058107077406709872}
- component: {fileID: 587711432829270645}
- component: {fileID: 4189849640380816173}
m_Layer: 5
m_Name: Icon
m_TagString: Untagged
@@ -763,53 +762,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4599222264323240281}
m_CullTransparentMesh: 1
--- !u!114 &8081783206361873868
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4599222264323240281}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage
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_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: -1
--- !u!114 &5548642987123338363
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4599222264323240281}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2fd09147b9e9d42a48d6ddc915ddc3d2, type: 3}
m_Name:
m_EditorClassIdentifier: SkiaSharp.Unity::SkiaSharp.Unity.SkottiePlayerV2
lottieFile: {fileID: 4900000, guid: 50e22b5bb8a496840952f2563758c13c, type: 3}
customResolution: 0
resWidth: 250
resHeight: 250
stateName: Idle
resetAfterFinished: 0
autoPlay: 1
loop: 1
--- !u!114 &3058107077406709872
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -850,7 +802,7 @@ MonoBehaviour:
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8081783206361873868}
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls:
@@ -880,6 +832,36 @@ MonoBehaviour:
m_EditorClassIdentifier: AppleHillsScripts::UI.HudMenuButton
pagePrefab: {fileID: 1498581815400593087, guid: ccd858c7962d48147b0233c1bf1382f5, type: 3}
buttonName: RamaSjang Button
--- !u!114 &4189849640380816173
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4599222264323240281}
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: 2364528222304962155, guid: 57224356af3d045dbbf8b420e13b4b10, 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!1 &5113586844274188410
GameObject:
m_ObjectHideFlags: 0
@@ -1185,6 +1167,7 @@ MonoBehaviour:
CinematicBackground: {fileID: 1256355336041814197}
eagleEye: {fileID: 8093509920149135307}
ramaSjangButton: {fileID: 4599222264323240281}
scrabBookButton: {fileID: 2880351836456325619}
cinematicSprites: {fileID: 0}
cinematicBackgroundSprites: {fileID: 0}
currentCinematicPlayer: {fileID: 0}

View File

@@ -614,6 +614,7 @@ GameObject:
- component: {fileID: 768265498311662326}
- component: {fileID: 6338084184716153992}
- component: {fileID: 253472492358066383}
- component: {fileID: 7628818949793551399}
m_Layer: 10
m_Name: FakeChoco
m_TagString: Untagged
@@ -633,7 +634,8 @@ Transform:
m_LocalPosition: {x: -6.784, y: -2.901, z: 0}
m_LocalScale: {x: 0.7, y: 0.7, z: 0.7}
m_ConstrainProportionsScale: 1
m_Children: []
m_Children:
- {fileID: 2205893234949555645}
m_Father: {fileID: 1509867968154593713}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &6338084184716153992
@@ -740,6 +742,45 @@ BoxCollider2D:
m_AutoTiling: 0
m_Size: {x: 6, y: 6}
m_EdgeRadius: 0
--- !u!114 &7628818949793551399
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2391935521422290070}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 833a4ccef651449e973e623d9107bef5, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::Interactions.OneClickInteraction
isOneTime: 0
cooldown: -1
characterToInteract: 2
interactionStarted:
m_PersistentCalls:
m_Calls: []
interactionInterrupted:
m_PersistentCalls:
m_Calls: []
characterArrived:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 5762733430166618195}
m_TargetAssemblyTypeName: PicnicBehaviour, AppleHillsScripts
m_MethodName: triedToStealChocolate
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: 2
interactionComplete:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2728537141134591410
GameObject:
m_ObjectHideFlags: 0
@@ -1322,6 +1363,104 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 5383276844808284485, guid: afbb486e5456a20479aee4cf8bc949b6, type: 3}
m_PrefabInstance: {fileID: 3750141998400252915}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7365721869475958115
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 768265498311662326}
m_Modifications:
- target: {fileID: 2991221189157356317, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalScale.x
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 2991221189157356317, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalScale.y
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 2991221189157356317, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalScale.z
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 8506461915049351794, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_Name
value: HighlightEffect
objectReference: {fileID: 0}
- target: {fileID: 8506461915049351794, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalScale.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalScale.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalScale.z
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8998003315986923927, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
--- !u!4 &2205893234949555645 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8693254833721559262, guid: f21581740b83b624cac5e6a8fa4d0f47, type: 3}
m_PrefabInstance: {fileID: 7365721869475958115}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7995402114015427944
PrefabInstance:
m_ObjectHideFlags: 0
@@ -1362,6 +1501,34 @@ PrefabInstance:
propertyPath: m_SortingOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 5762733430166618195}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: destroyFakeChocolate
objectReference: {fileID: 0}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: PicnicBehaviour, AppleHillsScripts
objectReference: {fileID: 0}
- target: {fileID: 2846246689251721816, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: interactionComplete.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 3984039030829909690, guid: b3fc964bec385174f85a143f2fcff121, type: 3}
propertyPath: m_LocalScale.x
value: 0.7

View File

@@ -148,8 +148,6 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6108475066390421500}
- {fileID: 6717870941799174515}
- {fileID: 4136733570236406132}
m_Father: {fileID: 1315170081792486277}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -402,8 +400,8 @@ MonoBehaviour:
m_EditorClassIdentifier: '::'
PageName:
transitionDuration: 0.3
rainbowIn: {fileID: 5382650426034128680}
rainbowOut: {fileID: 3983328028282460839}
rainbowIn: {fileID: 0}
rainbowOut: {fileID: 0}
gameLayoutContainer: {fileID: 904161782565348054}
exitButton: {fileID: 8427602740714176801}
rectMask: {fileID: 7425566603516801919}
@@ -528,99 +526,6 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &3983328028282460839
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6717870941799174515}
- component: {fileID: 6334910097310371923}
- component: {fileID: 8821021733826365168}
- component: {fileID: 9163925342151684341}
m_Layer: 5
m_Name: RainbowOut
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6717870941799174515
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3983328028282460839}
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: 8293076336493130222}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6334910097310371923
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3983328028282460839}
m_CullTransparentMesh: 1
--- !u!114 &8821021733826365168
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3983328028282460839}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage
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_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: -1
--- !u!114 &9163925342151684341
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3983328028282460839}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2fd09147b9e9d42a48d6ddc915ddc3d2, type: 3}
m_Name:
m_EditorClassIdentifier: SkiaSharp.Unity::SkiaSharp.Unity.SkottiePlayerV2
lottieFile: {fileID: 4900000, guid: 589505308c5daf449800f30dd4b92ce7, type: 3}
customResolution: 0
resWidth: 250
resHeight: 250
stateName:
resetAfterFinished: 0
autoPlay: 0
loop: 0
--- !u!1 &4270065472017787841
GameObject:
m_ObjectHideFlags: 0
@@ -936,99 +841,6 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &5382650426034128680
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6108475066390421500}
- component: {fileID: 2398693306920598044}
- component: {fileID: 7920249735731934357}
- component: {fileID: 3566391948883171773}
m_Layer: 5
m_Name: RainbowIn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6108475066390421500
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382650426034128680}
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: 8293076336493130222}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2398693306920598044
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382650426034128680}
m_CullTransparentMesh: 1
--- !u!114 &7920249735731934357
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382650426034128680}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage
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_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: -1
--- !u!114 &3566391948883171773
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5382650426034128680}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2fd09147b9e9d42a48d6ddc915ddc3d2, type: 3}
m_Name:
m_EditorClassIdentifier: SkiaSharp.Unity::SkiaSharp.Unity.SkottiePlayerV2
lottieFile: {fileID: 4900000, guid: 622be2ef9d5e27d45a9deaf7ed805f5f, type: 3}
customResolution: 0
resWidth: 250
resHeight: 250
stateName:
resetAfterFinished: 0
autoPlay: 0
loop: 0
--- !u!1 &5867455130109727138
GameObject:
m_ObjectHideFlags: 0

View File

@@ -285,8 +285,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 173}
m_SizeDelta: {x: 600, y: 150}
m_AnchoredPosition: {x: 0, y: 125}
m_SizeDelta: {x: 600, y: 120}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &5545241165728741220
CanvasRenderer:
@@ -343,8 +343,8 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 150
m_fontSizeBase: 150
m_fontSize: 125
m_fontSizeBase: 125
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
@@ -1053,6 +1053,10 @@ PrefabInstance:
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4925415087786595420, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_fontSize
value: 54.45
objectReference: {fileID: 0}
- target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMax.x
value: 0

View File

@@ -728,10 +728,18 @@ PrefabInstance:
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2162084082982493373, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
propertyPath: tabContainer
value:
objectReference: {fileID: 7104076737882304566}
- target: {fileID: 2162084082982493373, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
propertyPath: boosterOpeningPage
value:
objectReference: {fileID: 304904072851265091}
- target: {fileID: 2162084082982493373, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
propertyPath: zoneTabs.Array.size
value: 6
objectReference: {fileID: 0}
- target: {fileID: 2162084082982493373, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
propertyPath: cardEnlargedBackdrop
value:
@@ -740,6 +748,10 @@ PrefabInstance:
propertyPath: cardEnlargedContainer
value:
objectReference: {fileID: 8702856743180718180}
- target: {fileID: 2162084082982493373, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
propertyPath: 'zoneTabs.Array.data[5]'
value:
objectReference: {fileID: 5733094729750047914}
- target: {fileID: 2222053324174596529, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
propertyPath: m_AnchorMax.x
value: 0
@@ -1705,8 +1717,24 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
--- !u!114 &5733094729750047914 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 185814890104990467, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
m_PrefabInstance: {fileID: 5549612182461073321}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ff50caabb55742bc8d24a6ddffeda815, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.BookTabButton
--- !u!224 &5906828909529466605 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 2088943967680250180, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
m_PrefabInstance: {fileID: 5549612182461073321}
m_PrefabAsset: {fileID: 0}
--- !u!224 &7104076737882304566 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3428064805021480863, guid: 88a05fdd940194543ade1cc2bcdada5f, type: 3}
m_PrefabInstance: {fileID: 5549612182461073321}
m_PrefabAsset: {fileID: 0}

File diff suppressed because one or more lines are too long

View File

@@ -453761,6 +453761,10 @@ PrefabInstance:
propertyPath: m_PlayOnAwake
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8545106365577783398, guid: ead4e790fa3a1924ebd1586c93cd5479, type: 3}
propertyPath: isOneTime
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []

View File

@@ -1562,7 +1562,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 3533147658878909314, guid: 727a7e4b6df4b0d47897f7d8ee7fa323, type: 2}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
@@ -3633,6 +3633,18 @@ PrefabInstance:
propertyPath: m_Name
value: Tutorial
objectReference: {fileID: 0}
- target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
propertyPath: introVO
value:
objectReference: {fileID: 8300000, guid: fca641cdc8dcd074483fad3db1cbe24c, type: 3}
- target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
propertyPath: playTutorial
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4267886887244421663, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
propertyPath: bottleAudioPlayer
value:
objectReference: {fileID: 747976408}
- target: {fileID: 8452897808363562605, guid: a4dd78ff48942854ebb4c65025a8dc36, type: 3}
propertyPath: m_Sprite
value:

View File

@@ -11,9 +11,6 @@
"OptimizedRope",
"AudioSourceEvents",
"NewAssembly",
"SkiaSharp.Unity",
"SkiaSharp.Editor",
"SkiaSharp",
"Unity.Cinemachine"
],
"includePlatforms": [],

View File

@@ -86,7 +86,7 @@ namespace Cinematics
// If still null, try to add the component
if (playableDirector == null)
{
Debug.Log("[CinematicsManager] Could not find Playable Director on the PlayerHudManager");
Logging.Debug("[CinematicsManager] Could not find Playable Director on the PlayerHudManager");
}
}
@@ -99,7 +99,7 @@ namespace Cinematics
// If still null, return error
if (_cinematicSprites == null)
{
Debug.LogWarning("[CinematicsManager] No Image found for cinematics display. Cinematics may not display correctly.");
Logging.Warning("[CinematicsManager] No Image found for cinematics display. Cinematics may not display correctly.");
}
}

View File

@@ -27,7 +27,7 @@ namespace Core.Lifecycle
{
if (_instance != null)
{
Debug.LogWarning("[LifecycleManager] Instance already exists");
Logging.Warning("[LifecycleManager] Instance already exists");
return;
}
@@ -35,7 +35,7 @@ namespace Core.Lifecycle
_instance = go.AddComponent<LifecycleManager>();
DontDestroyOnLoad(go);
Debug.Log("[LifecycleManager] Instance created");
Logging.Debug("[LifecycleManager] Instance created");
}
#endregion
@@ -85,7 +85,7 @@ namespace Core.Lifecycle
}
else if (_instance != this)
{
Debug.LogWarning("[LifecycleManager] Duplicate instance detected. Destroying.");
Logging.Warning("[LifecycleManager] Duplicate instance detected. Destroying.");
Destroy(gameObject);
}
}
@@ -111,7 +111,7 @@ namespace Core.Lifecycle
{
if (component == null)
{
Debug.LogWarning("[LifecycleManager] Attempted to register null component");
Logging.Warning("[LifecycleManager] Attempted to register null component");
return;
}
@@ -469,6 +469,34 @@ namespace Core.Lifecycle
LogDebug($"Restored scene data to {restoredCount} components");
}
/// <summary>
/// Broadcasts scene restore completed event to all registered components.
/// Called AFTER all OnSceneRestoreRequested calls complete.
/// </summary>
public void BroadcastSceneRestoreCompleted()
{
LogDebug("Broadcasting SceneRestoreCompleted");
// Create a copy to avoid collection modification during iteration
var componentsCopy = new List<ManagedBehaviour>(managedAwakeList);
foreach (var component in componentsCopy)
{
if (component == null) continue;
try
{
component.InvokeSceneRestoreCompleted();
}
catch (Exception ex)
{
Debug.LogError($"[LifecycleManager] Exception during scene restore completed for {component.SaveId}: {ex}");
}
}
LogDebug("SceneRestoreCompleted broadcast complete");
}
/// <summary>
/// Broadcasts global restore request to all registered components that opt-in.
/// Distributes serialized data to matching components by SaveId.
@@ -627,7 +655,7 @@ namespace Core.Lifecycle
{
if (enableDebugLogging)
{
Debug.Log($"[LifecycleManager] {message}");
Logging.Debug($"[LifecycleManager] {message}");
}
}

View File

@@ -89,6 +89,7 @@ namespace Core.Lifecycle
public void InvokeSceneReady() => OnSceneReady();
public string InvokeSceneSaveRequested() => OnSceneSaveRequested();
public void InvokeSceneRestoreRequested(string data) => OnSceneRestoreRequested(data);
public void InvokeSceneRestoreCompleted() => OnSceneRestoreCompleted();
public string InvokeGlobalSaveRequested() => OnGlobalSaveRequested();
public void InvokeGlobalRestoreRequested(string data) => OnGlobalRestoreRequested(data);
public void InvokeManagedDestroy() => OnManagedDestroy();
@@ -118,7 +119,7 @@ namespace Core.Lifecycle
}
else
{
Debug.LogWarning($"[ManagedBehaviour] LifecycleManager not found for {gameObject.name}. Component will not receive lifecycle callbacks.");
Logging.Warning($"[ManagedBehaviour] LifecycleManager not found for {gameObject.name}. Component will not receive lifecycle callbacks.");
}
}
@@ -202,6 +203,10 @@ namespace Core.Lifecycle
/// Called during scene transitions to restore scene-specific state.
/// Receives previously serialized data (from OnSceneSaveRequested).
///
/// IMPORTANT: This method MUST be synchronous. Do not use coroutines or async/await.
/// OnSceneRestoreCompleted is called immediately after all restore calls complete,
/// so any async operations would still be running when it fires.
///
/// TIMING:
/// - Called AFTER scene load, during OnSceneReady phase
/// - Frequency: Every scene transition
@@ -212,6 +217,29 @@ namespace Core.Lifecycle
// Default: no-op
}
/// <summary>
/// Called after all scene restore operations complete.
/// Does NOT receive data - use OnSceneRestoreRequested for that.
///
/// GUARANTEE:
/// - ALWAYS called after scene load, whether there's save data or not
/// - All OnSceneRestoreRequested() calls have RETURNED (but async operations may still be running)
/// - Safe for synchronous restore operations (JSON deserialization, setting fields, etc.)
///
/// TIMING:
/// - Called AFTER all OnSceneRestoreRequested calls complete (or immediately if no save data exists)
/// - Frequency: Every scene transition
/// - Use for: Post-restore initialization, first-time initialization, triggering events after state is restored
///
/// COMMON PATTERN:
/// Use this to perform actions that depend on whether data was restored or not.
/// Example: Play one-time audio only if it hasn't been played before (_hasPlayed == false).
/// </summary>
protected virtual void OnSceneRestoreCompleted()
{
// Default: no-op
}
/// <summary>
/// Called once on game boot to restore global persistent state.
/// Receives data that was saved via OnGlobalSaveRequested.

View File

@@ -88,7 +88,7 @@ namespace Core.SaveLoad
}
else
{
Debug.LogWarning($"[AppleMachine] SaveLoadManager not available for '{name}'", this);
Logging.Warning($"[AppleMachine] SaveLoadManager not available for '{name}'");
}
}
@@ -98,7 +98,7 @@ namespace Core.SaveLoad
// Optional: Log the auto-generated ID in verbose mode
if (verbose && string.IsNullOrEmpty(customSaveId))
{
Debug.Log($"[SaveableStateMachine] '{name}' will use auto-generated Save ID: {GetSaveId()}", this);
Logging.Debug($"[SaveableStateMachine] '{name}' will use auto-generated Save ID: {GetSaveId()}");
}
}
#endif
@@ -158,7 +158,7 @@ namespace Core.SaveLoad
{
if (verbose)
{
Debug.LogWarning($"[SaveableStateMachine] No data to restore for '{name}'", this);
Logging.Warning($"[SaveableStateMachine] No data to restore for '{name}'");
}
return;
}
@@ -171,7 +171,7 @@ namespace Core.SaveLoad
{
if (verbose)
{
Debug.LogWarning($"[SaveableStateMachine] No state name in save data for '{name}'", this);
Logging.Warning($"[SaveableStateMachine] No state name in save data for '{name}'");
}
return;
}
@@ -197,7 +197,7 @@ namespace Core.SaveLoad
if (verbose)
{
Debug.Log($"[SaveableStateMachine] Restored '{name}' to state: {saveData.stateName}", this);
Logging.Debug($"[SaveableStateMachine] Restored '{name}' to state: {saveData.stateName}");
}
}
catch (System.Exception ex)
@@ -215,14 +215,14 @@ namespace Core.SaveLoad
[ContextMenu("Log Save ID")]
private void LogSaveId()
{
Debug.Log($"Save ID: {GetSaveId()}", this);
Logging.Debug($"Save ID: {GetSaveId()}");
}
[ContextMenu("Test Serialize")]
private void TestSerialize()
{
string serialized = SerializeState();
Debug.Log($"Serialized state: {serialized}", this);
Logging.Debug($"Serialized state: {serialized}");
}
#endif

View File

@@ -504,9 +504,19 @@ namespace Core.SaveLoad
/// </summary>
public void RestoreSceneData()
{
if (Lifecycle.LifecycleManager.Instance == null)
{
Logging.Warning("[SaveLoadManager] LifecycleManager not available for scene restore");
return;
}
if (currentSaveData == null || currentSaveData.participantStates == null)
{
Logging.Debug("[SaveLoadManager] No scene data to restore");
Logging.Debug("[SaveLoadManager] No scene data to restore (first visit or no save data)");
// Still broadcast restore completed so components can initialize properly
Lifecycle.LifecycleManager.Instance.BroadcastSceneRestoreCompleted();
Logging.Debug($"[SaveLoadManager] Scene restore completed (no data)");
return;
}
@@ -520,11 +530,12 @@ namespace Core.SaveLoad
}
// Restore scene data via LifecycleManager
if (Lifecycle.LifecycleManager.Instance != null)
{
Lifecycle.LifecycleManager.Instance.BroadcastSceneRestoreRequested(saveDataDict);
Logging.Debug($"[SaveLoadManager] Broadcast scene restore to LifecycleManager");
}
Lifecycle.LifecycleManager.Instance.BroadcastSceneRestoreRequested(saveDataDict);
Logging.Debug($"[SaveLoadManager] Broadcast scene restore to LifecycleManager");
// Broadcast scene restore completed - ALWAYS called, whether there's data or not
Lifecycle.LifecycleManager.Instance.BroadcastSceneRestoreCompleted();
Logging.Debug($"[SaveLoadManager] Scene restore completed");
}
/// <summary>
@@ -706,7 +717,7 @@ namespace Core.SaveLoad
{
IsSaving = false;
OnSaveCompleted?.Invoke(slot);
Debug.Log($"[SaveLoadManager] Save completed for slot '{slot}'");
Logging.Debug($"[SaveLoadManager] Save completed for slot '{slot}'");
}
}

View File

@@ -81,7 +81,7 @@ namespace Core
{
if (string.IsNullOrEmpty(serializedData))
{
Debug.LogWarning($"[SaveablePlayableDirector] No save data to restore for {gameObject.name}");
Logging.Warning($"[SaveablePlayableDirector] No save data to restore for {gameObject.name}");
return;
}
@@ -99,7 +99,7 @@ namespace Core
_director.time = _director.duration;
_director.Evaluate(); // Force evaluation to apply the state
Debug.Log($"[SaveablePlayableDirector] Restored completed timeline '{gameObject.name}' - seeked to end");
Logging.Debug($"[SaveablePlayableDirector] Restored completed timeline '{gameObject.name}' - seeked to end");
}
else if (_hasPlayed && saveData.playbackTime > 0)
{
@@ -107,7 +107,7 @@ namespace Core
_director.time = saveData.playbackTime;
_director.Evaluate();
Debug.Log($"[SaveablePlayableDirector] Restored timeline '{gameObject.name}' at time {saveData.playbackTime}");
Logging.Debug($"[SaveablePlayableDirector] Restored timeline '{gameObject.name}' at time {saveData.playbackTime}");
}
else
{
@@ -115,7 +115,7 @@ namespace Core
_director.time = 0;
_director.Evaluate();
Debug.Log($"[SaveablePlayableDirector] Timeline '{gameObject.name}' not yet played - at start");
Logging.Debug($"[SaveablePlayableDirector] Timeline '{gameObject.name}' not yet played - at start");
}
}

View File

@@ -387,6 +387,7 @@ namespace Core
}
else if (skipSave)
{
SaveLoadManager.Instance.RestoreSceneData();
LogDebugMessage($"Skipping restore for: {newSceneName} (skipSave=true)");
}

View File

@@ -1,3 +1,4 @@
using Core;
using UnityEngine;
using Core.Lifecycle;
@@ -35,7 +36,7 @@ public class soundBird_CanFly : ManagedBehaviour
{
if (string.IsNullOrEmpty(serializedData))
{
Debug.LogWarning($"[soundBird_CanFly] No save data to restore for {gameObject.name}");
Logging.Warning($"[soundBird_CanFly] No save data to restore for {gameObject.name}");
return;
}
@@ -43,7 +44,7 @@ public class soundBird_CanFly : ManagedBehaviour
if (saveData != null)
{
canFly = saveData.canFly;
Debug.Log($"[soundBird_CanFly] Restored canFly state: {canFly}");
Logging.Debug($"[soundBird_CanFly] Restored canFly state: {canFly}");
}
}

View File

@@ -95,6 +95,7 @@ namespace AppleHills.Data.CardSystem
public enum CardZone
{
NotApplicable,
AppleHills,
Quarry,
CementFactory,

View File

@@ -190,7 +190,7 @@ namespace Interactions
/// <returns>True if interaction succeeded, false otherwise</returns>
protected virtual bool DoInteraction()
{
Debug.LogWarning($"[Interactable] DoInteraction not implemented for {GetType().Name}");
Logging.Warning($"[Interactable] DoInteraction not implemented for {GetType().Name}");
return false;
}

View File

@@ -333,7 +333,7 @@ namespace Interactions
ItemSlotSaveData data = JsonUtility.FromJson<ItemSlotSaveData>(serializedData);
if (data == null)
{
Debug.LogWarning($"[ItemSlot] Failed to deserialize save data for {gameObject.name}");
Logging.Warning($"[ItemSlot] Failed to deserialize save data for {gameObject.name}");
return;
}
@@ -343,7 +343,7 @@ namespace Interactions
// Restore slotted item if there was one
if (!string.IsNullOrEmpty(data.slottedItemSaveId))
{
Debug.Log($"[ItemSlot] Restoring slotted item: {data.slottedItemSaveId} (itemId: {data.slottedItemDataId})");
Logging.Debug($"[ItemSlot] Restoring slotted item: {data.slottedItemSaveId} (itemId: {data.slottedItemDataId})");
RestoreSlottedItem(data.slottedItemSaveId, data.slottedItemDataId);
}
}
@@ -361,7 +361,7 @@ namespace Interactions
{
// Item not found in scene - it might be a dynamically spawned combined item
// Try to spawn it from the itemDataId
Debug.Log($"[ItemSlot] Slotted item not found in scene: {slottedItemSaveId}, attempting to spawn from itemId: {expectedItemDataId}");
Logging.Debug($"[ItemSlot] Slotted item not found in scene: {slottedItemSaveId}, attempting to spawn from itemId: {expectedItemDataId}");
GameObject prefab = interactionSettings?.FindPickupPrefabByItemId(expectedItemDataId);
if (prefab != null)
@@ -369,17 +369,17 @@ namespace Interactions
// Spawn the item (inactive, since it will be slotted)
slottedObject = Instantiate(prefab, transform.position, Quaternion.identity);
slottedObject.SetActive(false);
Debug.Log($"[ItemSlot] Successfully spawned combined item for slot: {expectedItemDataId}");
Logging.Debug($"[ItemSlot] Successfully spawned combined item for slot: {expectedItemDataId}");
}
else
{
Debug.LogWarning($"[ItemSlot] Could not find prefab for itemId: {expectedItemDataId}");
Logging.Warning($"[ItemSlot] Could not find prefab for itemId: {expectedItemDataId}");
return;
}
}
else if (slottedObject == null)
{
Debug.LogWarning($"[ItemSlot] Could not find slotted item with save ID: {slottedItemSaveId}");
Logging.Warning($"[ItemSlot] Could not find slotted item with save ID: {slottedItemSaveId}");
return;
}
@@ -395,13 +395,13 @@ namespace Interactions
{
if (slottedData.itemId != expectedItemDataId)
{
Debug.LogWarning($"[ItemSlot] ItemId mismatch! Pickup has '{slottedData.itemId}' but expected '{expectedItemDataId}'");
Logging.Warning($"[ItemSlot] ItemId mismatch! Pickup has '{slottedData.itemId}' but expected '{expectedItemDataId}'");
}
}
if (slottedData == null)
{
Debug.LogWarning($"[ItemSlot] Pickup {pickup.gameObject.name} has null itemData! Expected itemId: {expectedItemDataId}");
Logging.Warning($"[ItemSlot] Pickup {pickup.gameObject.name} has null itemData! Expected itemId: {expectedItemDataId}");
if (slottedObject != null)
Destroy(slottedObject);
return;
@@ -409,7 +409,7 @@ namespace Interactions
}
else
{
Debug.LogWarning($"[ItemSlot] Slotted object has no Pickup component: {slottedObject.name}");
Logging.Warning($"[ItemSlot] Slotted object has no Pickup component: {slottedObject.name}");
if (slottedObject != null)
Destroy(slottedObject);
return;
@@ -419,7 +419,7 @@ namespace Interactions
// Follower state is managed separately during save/load restoration
ApplySlottedItemState(slottedObject, slottedData, triggerEvents: false);
Debug.Log($"[ItemSlot] Successfully restored slotted item: {slottedData.itemName} (itemId: {slottedData.itemId})");
Logging.Debug($"[ItemSlot] Successfully restored slotted item: {slottedData.itemName} (itemId: {slottedData.itemId})");
}
/// <summary>
@@ -526,7 +526,7 @@ namespace Interactions
// If slot already has an item, reject the claim
if (currentlySlottedItemObject != null)
{
Debug.LogWarning($"[ItemSlot] Already has a slotted item, rejecting claim from {pickup.gameObject.name}");
Logging.Warning($"[ItemSlot] Already has a slotted item, rejecting claim from {pickup.gameObject.name}");
return false;
}
@@ -537,7 +537,7 @@ namespace Interactions
// Claim the pickup
ApplySlottedItemState(pickup.gameObject, pickup.itemData, triggerEvents: false);
Debug.Log($"[ItemSlot] Successfully claimed slotted item: {pickup.itemData?.itemName}");
Logging.Debug($"[ItemSlot] Successfully claimed slotted item: {pickup.itemData?.itemName}");
return true;
}

View File

@@ -166,7 +166,7 @@ namespace Interactions
PickupSaveData data = JsonUtility.FromJson<PickupSaveData>(serializedData);
if (data == null)
{
Debug.LogWarning($"[Pickup] Failed to deserialize save data for {gameObject.name}");
Logging.Warning($"[Pickup] Failed to deserialize save data for {gameObject.name}");
return;
}
@@ -200,7 +200,7 @@ namespace Interactions
}
else
{
Debug.LogWarning($"[Pickup] Could not find slot with SaveId: {data.slotSaveId}");
Logging.Warning($"[Pickup] Could not find slot with SaveId: {data.slotSaveId}");
}
}
}

View File

@@ -1,4 +1,5 @@
using UnityEngine;
using Core;
using UnityEngine;
namespace Interactions
{
@@ -38,7 +39,7 @@ namespace Interactions
{
if (string.IsNullOrEmpty(serializedData))
{
Debug.LogWarning($"[SaveableInteractable] Empty save data for {SaveId}");
Logging.Warning($"[SaveableInteractable] Empty save data for {SaveId}");
return;
}
@@ -85,17 +86,17 @@ namespace Interactions
[ContextMenu("Log Save ID")]
private void LogSaveId()
{
Debug.Log($"Save ID: {SaveId}");
Logging.Debug($"Save ID: {SaveId}");
}
[ContextMenu("Test Serialize/Deserialize")]
private void TestSerializeDeserialize()
{
string serialized = OnSceneSaveRequested();
Debug.Log($"Serialized state: {serialized}");
Logging.Debug($"Serialized state: {serialized}");
OnSceneRestoreRequested(serialized);
Debug.Log("Deserialization test complete");
Logging.Debug("Deserialization test complete");
}
#endif

View File

@@ -25,7 +25,7 @@ namespace Levels
{
base.Awake();
Debug.Log($"[LevelSwitch] Awake called for {gameObject.name} in scene {gameObject.scene.name}");
Logging.Debug($"[LevelSwitch] Awake called for {gameObject.name} in scene {gameObject.scene.name}");
if (_iconRenderer == null)
_iconRenderer = GetComponent<SpriteRenderer>();
@@ -38,12 +38,12 @@ namespace Levels
protected override void OnManagedAwake()
{
Debug.Log($"[LevelSwitch] OnManagedAwake called for {gameObject.name}");
Logging.Debug($"[LevelSwitch] OnManagedAwake called for {gameObject.name}");
}
protected override void OnSceneReady()
{
Debug.Log($"[LevelSwitch] OnSceneReady called for {gameObject.name}");
Logging.Debug($"[LevelSwitch] OnSceneReady called for {gameObject.name}");
}
#if UNITY_EDITOR
@@ -79,7 +79,7 @@ namespace Levels
{
if (switchData == null || string.IsNullOrEmpty(switchData.targetLevelSceneName))
{
Debug.LogWarning("LevelSwitch has no valid switchData!");
Logging.Warning("LevelSwitch has no valid switchData!");
return false;
}

View File

@@ -160,7 +160,7 @@ namespace Levels
{
if (switchData == null || string.IsNullOrEmpty(switchData.targetLevelSceneName))
{
Debug.LogWarning("MinigameSwitch has no valid switchData!");
Logging.Warning("MinigameSwitch has no valid switchData!");
return false;
}
@@ -231,7 +231,7 @@ namespace Levels
MinigameSwitchSaveData data = JsonUtility.FromJson<MinigameSwitchSaveData>(serializedData);
if (data == null)
{
Debug.LogWarning($"[MinigameSwitch] Failed to deserialize save data for {gameObject.name}");
Logging.Warning($"[MinigameSwitch] Failed to deserialize save data for {gameObject.name}");
return;
}

View File

@@ -13,7 +13,6 @@ using UI.Core;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Playables;
using Svg;
namespace Minigames.DivingForPictures
{

View File

@@ -1,19 +1,74 @@
using System;
using Core;
using Core.Lifecycle;
using UnityEngine;
public class BirdGameStats : MonoBehaviour
namespace PuzzleS
{
public int birdsFoundInLevel;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
/// <summary>
/// Tracks bird discovery progress in the bird finding minigame.
/// Saves scene-specific progress using the ManagedBehaviour lifecycle system.
/// </summary>
public class BirdGameStats : ManagedBehaviour
{
public int birdsFoundInLevel;
// Save system configuration
public override bool AutoRegisterForSave => true;
protected override void OnManagedAwake()
{
// Initialize after all managers are ready
}
public void BirdFound()
{
birdsFoundInLevel += 1;
}
#region Save/Load Lifecycle Hooks
protected override string OnSceneSaveRequested()
{
// Save scene-specific progress
var state = new BirdGameState
{
birdsFoundInLevel = this.birdsFoundInLevel
};
return JsonUtility.ToJson(state);
}
protected override void OnSceneRestoreRequested(string serializedData)
{
if (string.IsNullOrEmpty(serializedData))
{
// No saved data, keep default values
return;
}
try
{
var state = JsonUtility.FromJson<BirdGameState>(serializedData);
if (state != null)
{
birdsFoundInLevel = state.birdsFoundInLevel;
}
}
catch (Exception ex)
{
Logging.Warning($"[BirdGameStats] Failed to restore state: {ex.Message}");
}
}
#endregion
}
public void BirdFound()
/// <summary>
/// Serializable state for bird game progress
/// </summary>
[Serializable]
public class BirdGameState
{
birdsFoundInLevel += 1;
public int birdsFoundInLevel;
}
}

View File

@@ -613,7 +613,7 @@ namespace PuzzleS
protected override void OnSceneRestoreRequested(string data)
{
Debug.Log("[XAXA] PuzzleManager loading with data: " + data);
Logging.Debug("[XAXA] PuzzleManager loading with data: " + data);
if (string.IsNullOrEmpty(data) || data == "{}")
{

View File

@@ -3,12 +3,14 @@ using System;
using System.Diagnostics.Tracing;
using UnityEngine;
using UnityEngine.Audio;
using Core;
using Core.Lifecycle;
/// <summary>
/// We automatically add the AudioSource component here so we can control it. Do not add it manually!
/// </summary>
[RequireComponent(typeof(AudioSource))]
public class AppleAudioSource : MonoBehaviour
public class AppleAudioSource : ManagedBehaviour
{
public enum AudioSourceType{CriticalVO,VO,Ambience,SFX,Music}
public AudioSourceType audioSourceType;
@@ -17,8 +19,14 @@ public class AppleAudioSource : MonoBehaviour
[HideInInspector ] public int clipPriority;
public int sourcePriority;
protected override void Awake()
{
base.Awake();
audioSource = GetComponent<AudioSource>();
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void OnEnable()
protected override void OnManagedAwake()
{
audioSource = GetComponent<AudioSource>();
AudioManager.Instance.RegisterNewAudioSource(this);
@@ -54,6 +62,10 @@ public class AppleAudioSource : MonoBehaviour
public void Play(int requestedClipPriority)
{
if (audioSource == null)
{
audioSource = GetComponent<AudioSource>();
}
clipPriority = requestedClipPriority;
if (audioSourceType == AudioSourceType.CriticalVO || audioSourceType == AudioSourceType.VO)
{
@@ -63,7 +75,7 @@ public class AppleAudioSource : MonoBehaviour
}
else
{
Debug.Log("[AUDIOMANAGER] AppleAudioSource " + name + " was suppressed because something more important is playing");
Logging.Debug("[AUDIOMANAGER] AppleAudioSource " + name + " was suppressed because something more important is playing");
}
}
else

View File

@@ -5,6 +5,7 @@ using AppleHills.Core.Interfaces;
using System.Collections.Generic;
using AudioSourceEvents;
using System;
using Core;
using Core.Lifecycle;
public class AudioManager : ManagedBehaviour, IPausable
@@ -71,16 +72,14 @@ public class AudioManager : ManagedBehaviour, IPausable
}
else
{
Debug.LogWarning("[AudioManager] QuickAccess.Instance is null during OnManagedAwake. Some audio references may remain unset.");
Logging.Warning("[AudioManager] QuickAccess.Instance is null during OnManagedAwake. Some audio references may remain unset.");
}
// Diagnostic
foreach (AppleAudioSource _audioSource in criticalVOSources)
{
Debug.Log("Found source: " + _audioSource.name);
Logging.Debug("Found source: " + _audioSource.name);
}
Debug.Log("[AudioManager] OnManagedAwake completed");
}
public void SetAudioPauseBehavior(PauseBehavior newPauseBehavior)
@@ -104,15 +103,15 @@ public class AudioManager : ManagedBehaviour, IPausable
public LevelAudioObject GetCurrentLevelAudioObject()
{
Debug.Log("Audio objects: " + FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length);
Logging.Debug("Audio objects: " + FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length);
if (FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length > 1)
{
Debug.LogWarning("Warning! More than one LevelAudioObject in the level! Using the first one found");
Logging.Warning("Warning! More than one LevelAudioObject in the level! Using the first one found");
return FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None)[0];
}
if (FindObjectsByType<LevelAudioObject>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length == 0)
{
Debug.LogWarning("Error! No LevelAudioObject found, AudioManager might not function properly!");
Logging.Warning("Error! No LevelAudioObject found, AudioManager might not function properly!");
return null;
}
else
@@ -158,12 +157,10 @@ public class AudioManager : ManagedBehaviour, IPausable
/// </summary>
public bool RequestPlayVO(AppleAudioSource requestedAudioSource)
{
//Debug.Log($"[AUDIOMANAGER] CurrentVO source prio: {currentlyPlayingVO.sourcePriority}, clip prio: {currentlyPlayingVO.clipPriority} requested VO prio: {requestedAudioSource.sourcePriority}, clip prio: {clipPriority}");
// If nothing is playing, let the requested audio source play
if (currentlyPlayingVO == null)
{
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] Playing {currentlyPlayingVO.name} as nothing is currently playing.");
return true;
}
@@ -177,7 +174,6 @@ public class AudioManager : ManagedBehaviour, IPausable
{
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] {currentlyPlayingVO.name} is the same as {requestedAudioSource.name}. Triggering it again.");
return true;
}
@@ -187,7 +183,6 @@ public class AudioManager : ManagedBehaviour, IPausable
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] {currentlyPlayingVO.name} is not critical. Playing {requestedAudioSource.name} instead because it is critical.");
return true;
}
// If the requested audio source has the same priority as currently playing source, check the priority of the requested clip
@@ -197,8 +192,6 @@ public class AudioManager : ManagedBehaviour, IPausable
{
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
Debug.Log($"[AUDIOMANAGER] Interrupted {currentlyPlayingVO.name} because it has same priority as {requestedAudioSource.name} but the requested clip has higher priority");
return true;
}
else
@@ -210,7 +203,6 @@ public class AudioManager : ManagedBehaviour, IPausable
if (currentlyPlayingVO.audioSourceType == AppleAudioSource.AudioSourceType.CriticalVO && currentlyPlayingVO.sourcePriority > requestedAudioSource.sourcePriority)
{
currentlyPlayingVO.InterruptAudio(requestedAudioSource.name);
Debug.Log($"[AUDIOMANAGER] Interrupted {currentlyPlayingVO.name} because {requestedAudioSource.name} has higher priority");
InterruptAudioSource(requestedAudioSource);
SetupNewAudioSource(requestedAudioSource);
return true;
@@ -218,7 +210,6 @@ public class AudioManager : ManagedBehaviour, IPausable
// If the requested audio source didn't clear any of the above cases, tell it to get rekt.
else
{
Debug.Log($"[AUDIOMANAGER] {currentlyPlayingVO.name} is still playing. {requestedAudioSource.name} has lower priority");
return false;
}
}
@@ -232,7 +223,6 @@ public class AudioManager : ManagedBehaviour, IPausable
{
if (audioSource.audioSource.resource == null)
{
Debug.Log($"[AUDIOMANAGER] Faled to setup {audioSource.name}. Invalid resource");
}
else
{
@@ -281,7 +271,15 @@ public class AudioManager : ManagedBehaviour, IPausable
{
foreach (AppleAudioSource source in criticalVOSources)
{
source.InterruptAudio("GlobalInterrupt");
if (source == null)
{
return;
}
else
{
source.InterruptAudio("GlobalInterrupt");
}
}
foreach (AppleAudioSource source in VOSources)

View File

@@ -4,8 +4,11 @@ using System;
using System.Diagnostics.Tracing;
using UnityEngine;
using UnityEngine.Audio;
using Core;
using Core.Lifecycle;
using PuzzleS;
public class BushAudioController : MonoBehaviour
public class BushAudioController : ManagedBehaviour
{
private IAudioEventSource _eventSource;
public AppleAudioSource VOPlayer;
@@ -20,7 +23,7 @@ public class BushAudioController : MonoBehaviour
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
protected override void OnManagedAwake()
{
_eventSource = VOPlayer.audioSource.RequestEventHandlers();
_eventSource.AudioStopped += PlayBirdCounter;
@@ -48,9 +51,9 @@ public class BushAudioController : MonoBehaviour
}
public void OnDisable()
{
// Unsubscribe from events when disabled
_eventSource.AudioStopped -= PlayBirdCounter;
}
//public void OnDisable()
//{
// // Unsubscribe from events when disabled
// _eventSource.AudioStopped -= PlayBirdCounter;
//}
}

View File

@@ -1,22 +1,81 @@
using UnityEngine;
using UnityEngine.Audio;
using System;
using Core;
using Core.Lifecycle;
public class LevelAudioObject : MonoBehaviour
[Serializable]
public class LevelAudioObjectSaveData
{
public bool hasPlayed;
}
public class LevelAudioObject : ManagedBehaviour
{
[Header("Audio Settings")]
public AppleAudioSource narratorAudioSource;
public AudioResource firstNarration;
[Header("Playback Settings")]
[Tooltip("If true, the audio will only play once and never again after being played")]
public bool isOneTime;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
private bool _hasPlayed;
#region ManagedBehaviour Overrides
public override bool AutoRegisterForSave => isOneTime; // Only save if one-time audio
protected override string OnSceneSaveRequested()
{
PlayNarrationAudio();
if (!isOneTime)
return null; // No need to save if not one-time
LevelAudioObjectSaveData saveData = new LevelAudioObjectSaveData
{
hasPlayed = _hasPlayed
};
return JsonUtility.ToJson(saveData);
}
void PlayNarrationAudio()
protected override void OnSceneRestoreRequested(string serializedData)
{
if (!isOneTime || string.IsNullOrEmpty(serializedData))
return;
try
{
LevelAudioObjectSaveData saveData = JsonUtility.FromJson<LevelAudioObjectSaveData>(serializedData);
_hasPlayed = saveData.hasPlayed;
}
catch (Exception e)
{
Logging.Warning($"[LevelAudioObject] Failed to restore audio state: {e.Message}");
}
}
protected override void OnSceneRestoreCompleted()
{
if (isOneTime && !_hasPlayed)
{
PlayNarrationAudio();
}
}
#endregion
private void PlayNarrationAudio()
{
if (narratorAudioSource == null || firstNarration == null)
{
Logging.Warning($"[LevelAudioObject] Missing audio source or narration resource on {gameObject.name}");
return;
}
narratorAudioSource.audioSource.resource = firstNarration;
narratorAudioSource.Play(0);
_hasPlayed = true;
}
}

View File

@@ -1,3 +1,4 @@
using Core;
using UnityEngine;
public class ProximitySoundReaction : MonoBehaviour
@@ -12,13 +13,13 @@ public class ProximitySoundReaction : MonoBehaviour
private void OnCollisionEnter2D(Collision2D collision)
{
Debug.Log("overlap!");
Logging.Debug("overlap!");
}
private void OnTriggerEnter2D(Collider2D collision)
{
Debug.Log("Wolter triggered!");
Logging.Debug("Wolter triggered!");
}

View File

@@ -1,18 +1,17 @@
using Core;
using Core.Lifecycle;
using UnityEngine;
using UnityEngine.Audio;
public class PulverAudioController : MonoBehaviour
public class PulverAudioController : ManagedBehaviour
{
private AppleAudioSource audioSource;
public AppleAudioSource audioSource;
public AudioResource combineAudio;
private FollowerController followerController;
public ItemManager itemManager;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
protected override void OnManagedAwake()
{
audioSource = GetComponent<AppleAudioSource>();
followerController = GetComponent<FollowerController>();
followerController.PulverIsCombining.AddListener(PulverIsCombining);

View File

@@ -1,7 +1,6 @@
using System;
using UnityEngine;
using UnityEngine.UI;
using SkiaSharp.Unity;
using Input;
using AppleHills.Core;
using UI.Core;
@@ -11,8 +10,6 @@ using UI;
public class AppSwitcher : UIPage
{
public GameObject rainbowIn;
public GameObject rainbowOut;
public GameObject gameLayoutContainer;
public GameObject exitButton;
public RectMask2D rectMask;
@@ -20,8 +17,6 @@ public class AppSwitcher : UIPage
[Header("Slide Animation Settings")]
public float slideDuration = 0.5f;
private SkottiePlayerV2 rainbowInPlayer;
private SkottiePlayerV2 rainbowOutPlayer;
private TweenBase slideInTween;
private TweenBase slideOutTween;
@@ -30,16 +25,13 @@ public class AppSwitcher : UIPage
base.OnManagedAwake();
PageName = "AppSwitcher";
rainbowInPlayer = rainbowIn.GetComponent<SkottiePlayerV2>();
rainbowOutPlayer = rainbowOut.GetComponent<SkottiePlayerV2>();
if (rectMask == null)
{
rectMask = GetComponent<RectMask2D>();
}
// Initially hide both
rainbowIn.SetActive(true);
// Initially hide
exitButton.SetActive(false);
}
@@ -49,27 +41,19 @@ public class AppSwitcher : UIPage
gameLayoutContainer.SetActive(true);
// Hide rainbow out, show rainbow in
rainbowOut.SetActive(false);
// Play animation on rainbow in without resetting state
rainbowInPlayer.PlayAnimation(true);
// Slide in animation - tween padding.left from 1700 to 0
slideInTween = TweenPaddingLeft(1700f, 0f, Tween.EaseOut, () =>
{
onComplete?.Invoke();
rainbowOut.SetActive(true);
exitButton.SetActive(true);
});
}
protected override void DoTransitionOut(Action onComplete)
{
rainbowIn.SetActive(false);
// Play animation on rainbow out with resetting state
rainbowOutPlayer.PlayAnimation(true);
// Hide the exit button
exitButton.SetActive(false);
@@ -77,7 +61,6 @@ public class AppSwitcher : UIPage
// Slide out animation - tween padding.left from 0 to 1700
slideOutTween = TweenPaddingLeft(0f, 1700f, Tween.EaseIn, () => {
gameLayoutContainer.SetActive(false);
rainbowIn.SetActive(true);
onComplete?.Invoke();
InputManager.Instance.SetInputMode(InputMode.GameAndUI);
});

View File

@@ -1,5 +1,6 @@
using System;
using AppleHills.Data.CardSystem;
using Core;
using Pixelplacement;
using UnityEngine;
using UnityEngine.EventSystems;
@@ -82,37 +83,37 @@ namespace UI.CardSystem
/// </summary>
public void OnPointerClick(PointerEventData eventData)
{
Debug.Log($"[CLICK-TRACE-ALBUMCARD] OnPointerClick on {name}, _parentSlot={((_parentSlot != null) ? _parentSlot.name : "NULL")}, _isEnlarged={_isEnlarged}, position={eventData.position}");
Logging.Debug($"[CLICK-TRACE-ALBUMCARD] OnPointerClick on {name}, _parentSlot={((_parentSlot != null) ? _parentSlot.name : "NULL")}, _isEnlarged={_isEnlarged}, position={eventData.position}");
// During reveal flow (before placed in slot), forward clicks to parent FlippableCard
if (_parentSlot == null)
{
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - No parent slot, forwarding click to parent FlippableCard");
Logging.Debug($"[CLICK-TRACE-ALBUMCARD] {name} - No parent slot, forwarding click to parent FlippableCard");
// Find parent FlippableCard and forward the click
FlippableCard parentFlippable = GetComponentInParent<FlippableCard>();
if (parentFlippable != null)
{
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Found parent FlippableCard, calling OnPointerClick");
Logging.Debug($"[CLICK-TRACE-ALBUMCARD] {name} - Found parent FlippableCard, calling OnPointerClick");
parentFlippable.OnPointerClick(eventData);
}
else
{
Debug.LogWarning($"[CLICK-TRACE-ALBUMCARD] {name} - No parent FlippableCard found!");
Logging.Warning($"[CLICK-TRACE-ALBUMCARD] {name} - No parent FlippableCard found!");
}
return;
}
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Has parent slot, processing click");
Logging.Debug($"[CLICK-TRACE-ALBUMCARD] {name} - Has parent slot, processing click");
if (_isEnlarged)
{
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Is enlarged, requesting shrink");
Logging.Debug($"[CLICK-TRACE-ALBUMCARD] {name} - Is enlarged, requesting shrink");
OnShrinkRequested?.Invoke(this);
}
else
{
Debug.Log($"[CLICK-TRACE-ALBUMCARD] {name} - Is normal size, requesting enlarge");
Logging.Debug($"[CLICK-TRACE-ALBUMCARD] {name} - Is normal size, requesting enlarge");
OnEnlargeRequested?.Invoke(this);
}
}

View File

@@ -24,7 +24,9 @@ namespace UI.CardSystem
[SerializeField] private BookCurlPro.BookPro book;
[Header("Zone Navigation")]
[SerializeField] private BookTabButton[] zoneTabs; // All zone tab buttons
[SerializeField] private Transform tabContainer; // Container holding all BookTabButton children
private BookTabButton[] zoneTabs; // Discovered zone tab buttons
[Header("Album Card Reveal")]
[SerializeField] private SlotContainer bottomRightSlots;
@@ -46,6 +48,9 @@ namespace UI.CardSystem
{
base.OnManagedAwake();
// Discover zone tabs from container
DiscoverZoneTabs();
// Make sure we have a CanvasGroup for transitions
if (canvasGroup == null)
canvasGroup = GetComponent<CanvasGroup>();
@@ -67,6 +72,17 @@ namespace UI.CardSystem
// Set up booster pack button listeners
SetupBoosterButtonListeners();
// Subscribe to book page flip events
if (book != null)
{
book.OnFlip.AddListener(OnPageFlipped);
Logging.Debug("[AlbumViewPage] Subscribed to book.OnFlip event");
}
else
{
Logging.Warning("[AlbumViewPage] Book reference is null, cannot subscribe to OnFlip event!");
}
// Subscribe to CardSystemManager events (managers are guaranteed to be initialized)
if (CardSystemManager.Instance != null)
{
@@ -83,6 +99,36 @@ namespace UI.CardSystem
gameObject.SetActive(false);
}
/// <summary>
/// Discover all BookTabButton components from the tab container
/// </summary>
private void DiscoverZoneTabs()
{
if (tabContainer == null)
{
Debug.LogError("[AlbumViewPage] Tab container is not assigned! Cannot discover zone tabs.");
zoneTabs = new BookTabButton[0];
return;
}
// Get all BookTabButton components from children
zoneTabs = tabContainer.GetComponentsInChildren<BookTabButton>(includeInactive: false);
if (zoneTabs == null || zoneTabs.Length == 0)
{
Logging.Warning($"[AlbumViewPage] No BookTabButton components found in tab container '{tabContainer.name}'!");
zoneTabs = new BookTabButton[0];
}
else
{
Logging.Debug($"[AlbumViewPage] Discovered {zoneTabs.Length} zone tabs from container '{tabContainer.name}'");
foreach (var tab in zoneTabs)
{
Logging.Debug($" - Tab: {tab.name}, Zone: {tab.Zone}, TargetPage: {tab.TargetPage}");
}
}
}
private void SetupBoosterButtonListeners()
{
if (boosterPackButtons == null) return;
@@ -90,6 +136,12 @@ namespace UI.CardSystem
for (int i = 0; i < boosterPackButtons.Length; i++)
{
if (boosterPackButtons[i] == null) continue;
// Unsubscribe from book events
if (book != null)
{
book.OnFlip.RemoveListener(OnPageFlipped);
}
Button button = boosterPackButtons[i].GetComponent<Button>();
if (button != null)
@@ -157,7 +209,7 @@ namespace UI.CardSystem
if (Input.InputManager.Instance != null)
{
Input.InputManager.Instance.SetInputMode(_previousInputMode);
Debug.Log($"[AlbumViewPage] Restored input mode to {_previousInputMode} on exit");
Logging.Debug($"[AlbumViewPage] Restored input mode to {_previousInputMode} on exit");
}
if (UIPageController.Instance != null)
@@ -208,7 +260,7 @@ namespace UI.CardSystem
// Store the current input mode before switching
_previousInputMode = Input.InputMode.GameAndUI;
Input.InputManager.Instance.SetInputMode(Input.InputMode.UI);
Debug.Log("[AlbumViewPage] Switched to UI-only input mode on first entry");
Logging.Debug("[AlbumViewPage] Switched to UI-only input mode on first entry");
}
// Subscribe to pending card events while page is active
@@ -217,8 +269,16 @@ namespace UI.CardSystem
CardSystemManager.Instance.OnPendingCardAdded += OnPendingCardAdded;
}
// Spawn pending cards when opening album
SpawnPendingCards();
// Only spawn pending cards if we're already on an album page (not the menu)
if (IsInAlbumProper())
{
Logging.Debug("[AlbumViewPage] Opening directly to album page - spawning cards immediately");
SpawnPendingCards();
}
else
{
Logging.Debug("[AlbumViewPage] Opening to menu page - cards will spawn when entering album");
}
base.TransitionIn();
}
@@ -231,6 +291,9 @@ namespace UI.CardSystem
CardSystemManager.Instance.OnPendingCardAdded -= OnPendingCardAdded;
}
// Clean up active pending cards to prevent duplicates on next opening
CleanupActiveCards();
// Don't restore input mode here - only restore when actually exiting (in OnExitButtonClicked)
base.TransitionOut();
}
@@ -304,6 +367,46 @@ namespace UI.CardSystem
}
}
/// <summary>
/// Check if we're currently viewing the album proper (not the menu page)
/// </summary>
private bool IsInAlbumProper()
{
if (book == null)
{
Logging.Warning("[AlbumViewPage] Book reference is null in IsInAlbumProper check");
return false;
}
// Page 1 is the menu/cover, page 2+ are album pages with card slots
bool inAlbum = book.CurrentPaper > 1;
return inAlbum;
}
/// <summary>
/// Called when book page flips - show/hide pending cards based on whether we're in the album proper
/// </summary>
private void OnPageFlipped()
{
bool isInAlbum = IsInAlbumProper();
if (isInAlbum && _activeCards.Count == 0)
{
// Entering album proper and no cards spawned yet - spawn them with animation
Logging.Debug("[AlbumViewPage] Entering album proper - spawning pending cards with animation");
SpawnPendingCards();
}
else if (!isInAlbum && _activeCards.Count > 0)
{
// Returning to menu page - cleanup cards
Logging.Debug("[AlbumViewPage] Returning to menu page - cleaning up pending cards");
CleanupActiveCards();
}
else
{
Logging.Debug($"[AlbumViewPage] Page flipped but no card state change needed (already in correct state)");
}
}
#region Album Card Reveal System
/// <summary>
@@ -327,7 +430,7 @@ namespace UI.CardSystem
int spawnCount = Mathf.Min(uniquePending.Count, MAX_VISIBLE_CARDS);
Debug.Log($"[AlbumViewPage] Spawning {spawnCount} unique pending cards (total pending: {pending.Count})");
Logging.Debug($"[AlbumViewPage] Spawning {spawnCount} unique pending cards (total pending: {pending.Count})");
for (int i = 0; i < spawnCount; i++)
{
@@ -343,14 +446,14 @@ namespace UI.CardSystem
// Guard: Don't spawn cards with zero copies
if (cardData.CopiesOwned <= 0)
{
Debug.LogWarning($"[AlbumViewPage] Skipping spawn of card '{cardData.Name}' with {cardData.CopiesOwned} copies");
Logging.Warning($"[AlbumViewPage] Skipping spawn of card '{cardData.Name}' with {cardData.CopiesOwned} copies");
return;
}
DraggableSlot slot = FindSlotByIndex(slotIndex);
if (slot == null)
{
Debug.LogWarning($"[AlbumViewPage] Could not find slot with SlotIndex {slotIndex}");
Logging.Warning($"[AlbumViewPage] Could not find slot with SlotIndex {slotIndex}");
return;
}
@@ -377,11 +480,11 @@ namespace UI.CardSystem
// Track it
_activeCards.Add(cardPlacement);
Debug.Log($"[AlbumViewPage] Spawned card '{cardData.Name}' (CopiesOwned: {cardData.CopiesOwned}) in slot {slotIndex}");
Logging.Debug($"[AlbumViewPage] Spawned card '{cardData.Name}' (CopiesOwned: {cardData.CopiesOwned}) in slot {slotIndex}");
}
else
{
Debug.LogWarning($"[AlbumViewPage] Spawned card has no AlbumCardDraggable component!");
Logging.Warning($"[AlbumViewPage] Spawned card has no AlbumCardDraggable component!");
Destroy(cardObj);
}
}
@@ -395,7 +498,7 @@ namespace UI.CardSystem
// Guard: Don't spawn cards with zero copies
if (card.CopiesOwned <= 0)
{
Debug.LogWarning($"[AlbumViewPage] Ignoring pending card '{card.Name}' with {card.CopiesOwned} copies");
Logging.Warning($"[AlbumViewPage] Ignoring pending card '{card.Name}' with {card.CopiesOwned} copies");
return;
}
@@ -406,7 +509,7 @@ namespace UI.CardSystem
if (alreadySpawned)
{
Debug.Log($"[AlbumViewPage] Card '{card.Name}' already spawned, skipping duplicate spawn");
Logging.Debug($"[AlbumViewPage] Card '{card.Name}' already spawned, skipping duplicate spawn");
return; // Don't spawn duplicates
}
@@ -423,13 +526,13 @@ namespace UI.CardSystem
/// </summary>
private void OnCardRevealed(AlbumCardPlacementDraggable cardPlacement, CardData cardData)
{
Debug.Log($"[AlbumViewPage] Card revealed: {cardData.Name} (Zone: {cardData.Zone}, CopiesOwned: {cardData.CopiesOwned})");
Logging.Debug($"[AlbumViewPage] Card revealed: {cardData.Name} (Zone: {cardData.Zone}, CopiesOwned: {cardData.CopiesOwned})");
// IMMEDIATELY move card from pending to inventory upon reveal
if (CardSystemManager.Instance != null)
{
CardSystemManager.Instance.MarkCardAsPlaced(cardData);
Debug.Log($"[AlbumViewPage] Moved card '{cardData.Name}' from pending to inventory on reveal");
Logging.Debug($"[AlbumViewPage] Moved card '{cardData.Name}' from pending to inventory on reveal");
}
// Remove this card from active cards list
@@ -441,12 +544,12 @@ namespace UI.CardSystem
if (currentZone != cardData.Zone)
{
// Card is from a different zone - navigate to its zone
Debug.Log($"[AlbumViewPage] Card zone ({cardData.Zone}) doesn't match current zone ({currentZone}). Navigating to card's zone...");
Logging.Debug($"[AlbumViewPage] Card zone ({cardData.Zone}) doesn't match current zone ({currentZone}). Navigating to card's zone...");
NavigateToZone(cardData.Zone);
}
else
{
Debug.Log($"[AlbumViewPage] Card zone ({cardData.Zone}) matches current zone - no navigation needed.");
Logging.Debug($"[AlbumViewPage] Card zone ({cardData.Zone}) matches current zone - no navigation needed.");
}
// Shuffle remaining cards to front and spawn next unique card
@@ -461,7 +564,7 @@ namespace UI.CardSystem
/// </summary>
private void OnCardPlacedInAlbum(AlbumCardPlacementDraggable cardPlacement, CardData cardData)
{
Debug.Log($"[AlbumViewPage] Card placed in album slot: {cardData.Name}");
Logging.Debug($"[AlbumViewPage] Card placed in album slot: {cardData.Name}");
// Unsubscribe from events (card is now static in album)
cardPlacement.OnCardRevealed -= OnCardRevealed;
@@ -545,7 +648,9 @@ namespace UI.CardSystem
public CardZone GetCurrentZone()
{
if (book == null || zoneTabs == null || zoneTabs.Length == 0)
{
return CardZone.AppleHills; // Default
}
int currentPage = book.CurrentPaper;
@@ -557,9 +662,8 @@ namespace UI.CardSystem
return tab.Zone;
}
}
// Fallback to first zone
return zoneTabs[0].Zone;
return CardZone.NotApplicable;
}
/// <summary>
@@ -567,16 +671,20 @@ namespace UI.CardSystem
/// </summary>
public BookTabButton GetTabForZone(CardZone zone)
{
if (zoneTabs == null)
{
return null;
}
foreach (var tab in zoneTabs)
{
{
if (tab.Zone == zone)
{
return tab;
}
}
return null;
}
@@ -643,7 +751,7 @@ namespace UI.CardSystem
{
if (card == null) return;
Debug.Log($"[AlbumViewPage] OnCardEnlargeRequested called for card: {card.name}, current parent: {card.transform.parent.name}");
Logging.Debug($"[AlbumViewPage] OnCardEnlargeRequested called for card: {card.name}, current parent: {card.transform.parent.name}");
// IMPORTANT: Call EnlargeCard FIRST to store original parent (the slot)
// BEFORE reparenting to the enlarged container
@@ -653,7 +761,7 @@ namespace UI.CardSystem
if (cardEnlargedBackdrop != null)
{
cardEnlargedBackdrop.SetActive(true);
Debug.Log($"[AlbumViewPage] Backdrop shown");
Logging.Debug($"[AlbumViewPage] Backdrop shown");
}
// NOW reparent card to enlarged container (above backdrop)
@@ -661,10 +769,10 @@ namespace UI.CardSystem
{
card.transform.SetParent(cardEnlargedContainer, true);
card.transform.SetAsLastSibling(); // Ensure on top
Debug.Log($"[AlbumViewPage] Card reparented to enlarged container");
Logging.Debug($"[AlbumViewPage] Card reparented to enlarged container");
}
Debug.Log($"[AlbumViewPage] Card enlarged: {card.GetCardData()?.Name}");
Logging.Debug($"[AlbumViewPage] Card enlarged: {card.GetCardData()?.Name}");
}
/// <summary>
@@ -692,7 +800,7 @@ namespace UI.CardSystem
card.transform.localRotation = card.GetOriginalLocalRotation();
}
Debug.Log($"[AlbumViewPage] Card shrunk: {card.GetCardData()?.Name}");
Logging.Debug($"[AlbumViewPage] Card shrunk: {card.GetCardData()?.Name}");
}
/// <summary>
@@ -703,7 +811,7 @@ namespace UI.CardSystem
if (previewCardTransform == null)
return;
Debug.Log($"[AlbumViewPage] ShowSlotPreview called for slot: {slot.name}");
Logging.Debug($"[AlbumViewPage] ShowSlotPreview called for slot: {slot.name}");
// Show backdrop
if (cardEnlargedBackdrop != null)
@@ -727,7 +835,7 @@ namespace UI.CardSystem
if (previewCardTransform == null)
return;
Debug.Log($"[AlbumViewPage] HideSlotPreview called for slot: {slot.name}");
Logging.Debug($"[AlbumViewPage] HideSlotPreview called for slot: {slot.name}");
// Hide backdrop
if (cardEnlargedBackdrop != null)

View File

@@ -1,6 +1,7 @@
using System;
using AppleHills.Data.CardSystem;
using BookCurlPro;
using Core;
using UnityEngine;
using UnityEngine.UI;
using Tween = Pixelplacement.Tween;
@@ -69,7 +70,7 @@ namespace UI.CardSystem
{
if (book == null)
{
Debug.LogWarning($"[BookTabButton] No BookPro reference assigned on {gameObject.name}");
Logging.Warning($"[BookTabButton] No BookPro reference assigned on {gameObject.name}");
return;
}

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using AppleHills.Data.CardSystem;
using Core;
using Data.CardSystem;
using Pixelplacement;
using UI.Core;
@@ -68,7 +69,7 @@ namespace UI.CardSystem
}
else
{
Debug.LogWarning("[BoosterOpeningPage] albumIcon does not have a Button component!");
Logging.Warning("[BoosterOpeningPage] albumIcon does not have a Button component!");
}
}
@@ -111,13 +112,20 @@ namespace UI.CardSystem
if (UIPageController.Instance != null)
{
UIPageController.Instance.PopPage();
Debug.Log("[BoosterOpeningPage] Dismiss button clicked, popping page from stack");
Logging.Debug("[BoosterOpeningPage] Dismiss button clicked, popping page from stack");
}
}
public override void TransitionIn()
{
base.TransitionIn();
// Ensure album icon is visible when page opens
if (albumIcon != null)
{
albumIcon.SetActive(true);
}
InitializeBoosterDisplay();
}
@@ -132,17 +140,17 @@ namespace UI.CardSystem
/// </summary>
private void InitializeBoosterDisplay()
{
Debug.Log($"[BoosterOpeningPage] InitializeBoosterDisplay called with {_availableBoosterCount} boosters available");
Logging.Debug($"[BoosterOpeningPage] InitializeBoosterDisplay called with {_availableBoosterCount} boosters available");
if (boosterPackPrefab == null)
{
Debug.LogWarning("BoosterOpeningPage: No booster pack prefab assigned!");
Logging.Warning("BoosterOpeningPage: No booster pack prefab assigned!");
return;
}
if (bottomRightSlots == null || bottomRightSlots.SlotCount == 0)
{
Debug.LogWarning("BoosterOpeningPage: No slots available!");
Logging.Warning("BoosterOpeningPage: No slots available!");
return;
}
@@ -152,7 +160,7 @@ namespace UI.CardSystem
// Calculate how many boosters to show (max 3, or available count, whichever is lower)
int visibleCount = Mathf.Min(_availableBoosterCount, MAX_VISIBLE_BOOSTERS);
Debug.Log($"[BoosterOpeningPage] Will spawn {visibleCount} boosters");
Logging.Debug($"[BoosterOpeningPage] Will spawn {visibleCount} boosters");
// Spawn boosters and assign to slots
for (int i = 0; i < visibleCount; i++)
@@ -165,11 +173,11 @@ namespace UI.CardSystem
{
centerOpeningSlot.OnOccupied += OnBoosterPlacedInCenter;
centerOpeningSlot.OnVacated += OnBoosterRemovedFromCenter;
Debug.Log($"[BoosterOpeningPage] Subscribed to center slot events");
Logging.Debug($"[BoosterOpeningPage] Subscribed to center slot events");
}
else
{
Debug.LogWarning("[BoosterOpeningPage] centerOpeningSlot is null!");
Logging.Warning("[BoosterOpeningPage] centerOpeningSlot is null!");
}
}
@@ -181,7 +189,7 @@ namespace UI.CardSystem
DraggableSlot slot = FindSlotByIndex(slotIndex);
if (slot == null)
{
Debug.LogWarning($"[BoosterOpeningPage] Could not find slot with SlotIndex {slotIndex}!");
Logging.Warning($"[BoosterOpeningPage] Could not find slot with SlotIndex {slotIndex}!");
return;
}
@@ -204,11 +212,11 @@ namespace UI.CardSystem
// Track it
_activeBoostersInSlots.Add(booster);
Debug.Log($"[BoosterOpeningPage] Spawned booster in slot with SlotIndex {slotIndex}");
Logging.Debug($"[BoosterOpeningPage] Spawned booster in slot with SlotIndex {slotIndex}");
}
else
{
Debug.LogWarning($"[BoosterOpeningPage] Spawned booster has no BoosterPackDraggable component!");
Logging.Warning($"[BoosterOpeningPage] Spawned booster has no BoosterPackDraggable component!");
Destroy(boosterObj);
}
}
@@ -244,7 +252,7 @@ namespace UI.CardSystem
booster.CurrentSlot.Vacate();
}
Debug.Log($"[BoosterOpeningPage] Removed booster from slot {slotIndex}");
Logging.Debug($"[BoosterOpeningPage] Removed booster from slot {slotIndex}");
}
_activeBoostersInSlots.RemoveAt(slotIndex);
@@ -264,7 +272,7 @@ namespace UI.CardSystem
RemoveBoosterFromSlot(lastIndex);
}
Debug.Log($"[BoosterOpeningPage] Updated visible boosters: {_activeBoostersInSlots.Count}/{targetCount}");
Logging.Debug($"[BoosterOpeningPage] Updated visible boosters: {_activeBoostersInSlots.Count}/{targetCount}");
}
/// <summary>
@@ -274,7 +282,7 @@ namespace UI.CardSystem
{
if (_activeBoostersInSlots.Count == 0) return;
Debug.Log($"[BoosterOpeningPage] Shuffling {_activeBoostersInSlots.Count} boosters to front slots");
Logging.Debug($"[BoosterOpeningPage] Shuffling {_activeBoostersInSlots.Count} boosters to front slots");
// Unassign all boosters from their current slots
foreach (var booster in _activeBoostersInSlots)
@@ -294,12 +302,12 @@ namespace UI.CardSystem
if (targetSlot != null)
{
Debug.Log($"[BoosterOpeningPage] Assigning booster to slot with SlotIndex {i} {targetSlot.name}");
Logging.Debug($"[BoosterOpeningPage] Assigning booster to slot with SlotIndex {i} {targetSlot.name}");
booster.AssignToSlot(targetSlot, true); // Animate the move
}
else
{
Debug.LogWarning($"[BoosterOpeningPage] Could not find slot with SlotIndex {i} {targetSlot.name}");
Logging.Warning($"[BoosterOpeningPage] Could not find slot with SlotIndex {i} {targetSlot.name}");
}
}
}
@@ -344,7 +352,7 @@ namespace UI.CardSystem
if (slot != null && !slot.IsOccupied)
{
SpawnBoosterInSlot(i);
Debug.Log($"[BoosterOpeningPage] Spawned new booster in slot with SlotIndex {i}");
Logging.Debug($"[BoosterOpeningPage] Spawned new booster in slot with SlotIndex {i}");
break;
}
}
@@ -363,13 +371,20 @@ namespace UI.CardSystem
// Remove from active slots list
_activeBoostersInSlots.Remove(booster);
// Hide album icon when booster is placed in center
if (albumIcon != null)
{
albumIcon.SetActive(false);
Logging.Debug($"[BoosterOpeningPage] Album icon hidden");
}
// Lock the slot so it can't be dragged out
Debug.Log($"[BoosterOpeningPage] Locking center slot. IsLocked before: {centerOpeningSlot.IsLocked}");
Logging.Debug($"[BoosterOpeningPage] Locking center slot. IsLocked before: {centerOpeningSlot.IsLocked}");
centerOpeningSlot.SetLocked(true);
Debug.Log($"[BoosterOpeningPage] IsLocked after: {centerOpeningSlot.IsLocked}");
Logging.Debug($"[BoosterOpeningPage] IsLocked after: {centerOpeningSlot.IsLocked}");
// Configure booster for opening (disables drag, enables tapping, resets tap count)
Debug.Log($"[BoosterOpeningPage] Calling SetInOpeningSlot(true) on booster");
Logging.Debug($"[BoosterOpeningPage] Calling SetInOpeningSlot(true) on booster");
booster.SetInOpeningSlot(true);
// Subscribe to tap events for visual feedback
@@ -384,7 +399,7 @@ namespace UI.CardSystem
// Shuffle remaining boosters to occupy the first slots
ShuffleBoostersToFront();
Debug.Log($"[BoosterOpeningPage] Booster placed in center, ready for taps. Active boosters in slots: {_activeBoostersInSlots.Count}");
Logging.Debug($"[BoosterOpeningPage] Booster placed in center, ready for taps. Active boosters in slots: {_activeBoostersInSlots.Count}");
}
/// <summary>
@@ -403,12 +418,12 @@ namespace UI.CardSystem
}
_currentBoosterInCenter = null;
Debug.Log($"[BoosterOpeningPage] Booster removed from center");
Logging.Debug($"[BoosterOpeningPage] Booster removed from center");
}
private void OnBoosterTapped(BoosterPackDraggable booster, int currentTaps, int maxTaps)
{
Debug.Log($"[BoosterOpeningPage] Booster tapped: {currentTaps}/{maxTaps}");
Logging.Debug($"[BoosterOpeningPage] Booster tapped: {currentTaps}/{maxTaps}");
// Fire Cinemachine impulse with random velocity (excluding Z)
if (impulseSource != null)
@@ -433,7 +448,7 @@ namespace UI.CardSystem
/// </summary>
private void OnBoosterOpened(BoosterPackDraggable booster)
{
Debug.Log($"[BoosterOpeningPage] Booster opened, playing particle effect");
Logging.Debug($"[BoosterOpeningPage] Booster opened, playing particle effect");
// Reset and play particle system
if (openingParticleSystem != null)
@@ -471,7 +486,7 @@ namespace UI.CardSystem
{
if (_isProcessingOpening) return;
Debug.Log($"[BoosterOpeningPage] Booster ready to open!");
Logging.Debug($"[BoosterOpeningPage] Booster ready to open!");
// Trigger the actual opening sequence
booster.TriggerOpen();
@@ -514,7 +529,7 @@ namespace UI.CardSystem
// WaitForCardReveals already includes: 0.5s wait + (cardCount * 0.5s stagger) + 0.5s animation + 0.5s final
// Total is: 1.5s + (cardCount * 0.5s)
// For 5 cards that's 4 seconds total, which should be enough
Debug.Log("[BoosterOpeningPage] Last booster opened, auto-transitioning to album main page");
Logging.Debug("[BoosterOpeningPage] Last booster opened, auto-transitioning to album main page");
if (UIPageController.Instance != null)
{
UIPageController.Instance.PopPage();
@@ -561,7 +576,7 @@ namespace UI.CardSystem
{
if (flippableCardPrefab == null || cardDisplayContainer == null)
{
Debug.LogWarning("BoosterOpeningPage: Missing card prefab or container!");
Logging.Warning("BoosterOpeningPage: Missing card prefab or container!");
return;
}
@@ -605,7 +620,7 @@ namespace UI.CardSystem
}
else
{
Debug.LogWarning($"[BoosterOpeningPage] FlippableCard component not found on card {i}!");
Logging.Warning($"[BoosterOpeningPage] FlippableCard component not found on card {i}!");
}
_currentRevealedCards.Add(cardObj);
@@ -621,7 +636,7 @@ namespace UI.CardSystem
/// </summary>
private void OnCardFlipStarted(FlippableCard flippingCard)
{
Debug.Log($"[BoosterOpeningPage] Card flip started, disabling all other cards.");
Logging.Debug($"[BoosterOpeningPage] Card flip started, disabling all other cards.");
// Disable ALL cards immediately to prevent multi-flip
foreach (GameObject cardObj in _currentRevealedCards)
@@ -639,14 +654,14 @@ namespace UI.CardSystem
/// </summary>
private void OnCardRevealed(int cardIndex)
{
Debug.Log($"[BoosterOpeningPage] Card {cardIndex} revealed!");
Logging.Debug($"[BoosterOpeningPage] Card {cardIndex} revealed!");
_revealedCardCount++;
// Get the flippable card and card data
FlippableCard flippableCard = _currentRevealedCards[cardIndex].GetComponent<FlippableCard>();
if (flippableCard == null)
{
Debug.LogWarning($"[BoosterOpeningPage] FlippableCard not found for card {cardIndex}!");
Logging.Warning($"[BoosterOpeningPage] FlippableCard not found for card {cardIndex}!");
return;
}
@@ -657,7 +672,7 @@ namespace UI.CardSystem
if (isNew)
{
Debug.Log($"[BoosterOpeningPage] Card '{cardData.Name}' is NEW!");
Logging.Debug($"[BoosterOpeningPage] Card '{cardData.Name}' is NEW!");
flippableCard.ShowAsNew();
}
else
@@ -665,7 +680,7 @@ namespace UI.CardSystem
// Check if card is already Legendary - if so, skip progress bar and auto-progress
if (existingCard.Rarity == AppleHills.Data.CardSystem.CardRarity.Legendary)
{
Debug.Log($"[BoosterOpeningPage] Card '{cardData.Name}' is LEGENDARY - auto-progressing!");
Logging.Debug($"[BoosterOpeningPage] Card '{cardData.Name}' is LEGENDARY - auto-progressing!");
// Add to inventory immediately and move to next card
Data.CardSystem.CardSystemManager.Instance.AddCardToInventoryDelayed(cardData);
_cardsCompletedInteraction++;
@@ -675,14 +690,14 @@ namespace UI.CardSystem
}
int ownedCount = existingCard.CopiesOwned;
Debug.Log($"[BoosterOpeningPage] Card '{cardData.Name}' is a REPEAT! Owned: {ownedCount}");
Logging.Debug($"[BoosterOpeningPage] Card '{cardData.Name}' is a REPEAT! Owned: {ownedCount}");
// Check if this card will trigger an upgrade (ownedCount + 1 >= threshold)
bool willUpgrade = (ownedCount + 1) >= flippableCard.CardsToUpgrade && existingCard.Rarity < AppleHills.Data.CardSystem.CardRarity.Legendary;
if (willUpgrade)
{
Debug.Log($"[BoosterOpeningPage] This card will trigger upgrade! ({ownedCount + 1}/{flippableCard.CardsToUpgrade})");
Logging.Debug($"[BoosterOpeningPage] This card will trigger upgrade! ({ownedCount + 1}/{flippableCard.CardsToUpgrade})");
// Show as repeat - progress bar will fill and auto-trigger upgrade
flippableCard.ShowAsRepeatWithUpgrade(ownedCount, existingCard);
}
@@ -705,7 +720,7 @@ namespace UI.CardSystem
/// </summary>
private void OnCardCompletedInteraction(FlippableCard card, int cardIndex)
{
Debug.Log($"[BoosterOpeningPage] Card {cardIndex} interaction complete!");
Logging.Debug($"[BoosterOpeningPage] Card {cardIndex} interaction complete!");
// Add card to inventory NOW (after player saw it)
Data.CardSystem.CardSystemManager.Instance.AddCardToInventoryDelayed(card.CardData);
@@ -722,7 +737,7 @@ namespace UI.CardSystem
// Re-enable all unrevealed cards (they can be flipped now)
EnableUnrevealedCards();
Debug.Log($"[BoosterOpeningPage] Cards completed interaction: {_cardsCompletedInteraction}/{_currentCardData.Length}");
Logging.Debug($"[BoosterOpeningPage] Cards completed interaction: {_cardsCompletedInteraction}/{_currentCardData.Length}");
}
/// <summary>
@@ -743,7 +758,7 @@ namespace UI.CardSystem
}
}
Debug.Log($"[BoosterOpeningPage] Set active card. Only one card is now clickable.");
Logging.Debug($"[BoosterOpeningPage] Set active card. Only one card is now clickable.");
}
/// <summary>
@@ -760,7 +775,7 @@ namespace UI.CardSystem
}
}
Debug.Log($"[BoosterOpeningPage] Re-enabled unrevealed cards for flipping.");
Logging.Debug($"[BoosterOpeningPage] Re-enabled unrevealed cards for flipping.");
}
/// <summary>
@@ -768,7 +783,7 @@ namespace UI.CardSystem
/// </summary>
private void OnCardClickedWhileInactive(FlippableCard inactiveCard)
{
Debug.Log($"[BoosterOpeningPage] Inactive card clicked, jiggling active card.");
Logging.Debug($"[BoosterOpeningPage] Inactive card clicked, jiggling active card.");
if (_currentActiveCard != null)
{
@@ -787,7 +802,7 @@ namespace UI.CardSystem
yield return null;
}
Debug.Log($"[BoosterOpeningPage] All cards revealed! Waiting for interactions...");
Logging.Debug($"[BoosterOpeningPage] All cards revealed! Waiting for interactions...");
// Wait until all cards have completed their new/repeat interaction
while (_cardsCompletedInteraction < _currentCardData.Length)
@@ -795,11 +810,18 @@ namespace UI.CardSystem
yield return null;
}
Debug.Log($"[BoosterOpeningPage] All interactions complete! Animating cards to album...");
Logging.Debug($"[BoosterOpeningPage] All interactions complete! Animating cards to album...");
// All cards revealed and interacted with, wait a moment
yield return new WaitForSeconds(0.5f);
// Show album icon before cards start tweening to it
if (albumIcon != null)
{
albumIcon.SetActive(true);
Logging.Debug($"[BoosterOpeningPage] Album icon shown for card tween target");
}
// Animate cards to album icon (or center if no icon assigned) with staggered delays
Vector3 targetPosition = albumIcon != null ? albumIcon.transform.position : Vector3.zero;
@@ -828,6 +850,8 @@ namespace UI.CardSystem
_currentRevealedCards.Clear();
yield return new WaitForSeconds(totalAnimationTime);
// Album icon stays visible for next booster (will be hidden when next booster is placed)
}
/// <summary>

View File

@@ -1,4 +1,5 @@
using System.Collections;
using Core;
using Data.CardSystem;
using UnityEngine;
using UnityEngine.Events;
@@ -58,7 +59,7 @@ namespace UI.CardSystem
{
if (Instance != null && Instance != this)
{
Debug.LogWarning("[BoosterPackGiver] Duplicate instance detected. Destroying this component.");
Logging.Warning("[BoosterPackGiver] Duplicate instance detected. Destroying this component.");
Destroy(this);
yield break;
}

View File

@@ -1,4 +1,5 @@
using UI.Core;
using Core;
using UI.Core;
using UnityEngine;
using UnityEngine.UI;
@@ -46,7 +47,7 @@ namespace UI.CardSystem
openAlbumButton.onClick.RemoveListener(OnOpenAlbumClicked);
}
Debug.Log("ALBUM: CardAlbumDestroyed");
Logging.Debug("ALBUM: CardAlbumDestroyed");
}
private void OnOpenAlbumClicked()

View File

@@ -335,7 +335,7 @@ namespace UI.CardSystem
{
if (editorCardDefinition == null)
{
UnityEngine.Debug.LogWarning("[CardDisplay] No Card Definition assigned in Editor Tools.");
Debug.LogWarning("[CardDisplay] No Card Definition assigned in Editor Tools.");
return;
}

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using AppleHills.Data.CardSystem;
using Core;
using Data.CardSystem;
using Pixelplacement;
using UI.DragAndDrop.Core;
@@ -63,15 +64,15 @@ namespace UI.CardSystem
/// </summary>
public void RevealCard()
{
if (_isRevealed) return;
if (_isRevealed)
{
return;
}
_isRevealed = true;
if (flippableCard != null)
{
flippableCard.FlipToReveal();
}
OnCardRevealed?.Invoke(this, _cardData);
}
@@ -82,7 +83,7 @@ namespace UI.CardSystem
{
if (_cardData == null)
{
Debug.LogWarning("[AlbumCardPlacementDraggable] Cannot snap to slot - no card data assigned.");
Logging.Warning("[AlbumCardPlacementDraggable] Cannot snap to slot - no card data assigned.");
return;
}
@@ -117,7 +118,7 @@ namespace UI.CardSystem
TweenExtractedCardToSlot(extractedCard, () =>
{
// After animation completes
Debug.Log($"[AlbumCardPlacementDraggable] Card placement animation complete for {_cardData.Name}");
Logging.Debug($"[AlbumCardPlacementDraggable] Card placement animation complete for {_cardData.Name}");
// Notify that card was placed
OnCardPlacedInAlbum?.Invoke(this, _cardData);
@@ -128,13 +129,13 @@ namespace UI.CardSystem
}
else
{
Debug.LogWarning("[AlbumCardPlacementDraggable] Failed to extract AlbumCard from wrapper!");
Logging.Warning("[AlbumCardPlacementDraggable] Failed to extract AlbumCard from wrapper!");
}
}
}
else
{
Debug.LogWarning($"[AlbumCardPlacementDraggable] Could not find matching slot for card '{_cardData.Name}' (Zone: {_cardData.Zone}, Index: {_cardData.CollectionIndex})");
Logging.Warning($"[AlbumCardPlacementDraggable] Could not find matching slot for card '{_cardData.Name}' (Zone: {_cardData.Zone}, Index: {_cardData.CollectionIndex})");
}
}
@@ -162,7 +163,7 @@ namespace UI.CardSystem
Tween.LocalRotation(cardTransform, Quaternion.identity, snapDuration, 0f, Tween.EaseOutBack,
completeCallback: () =>
{
Debug.Log($"[AlbumCardPlacementDraggable] Tween complete for extracted card {card.name}, final height: {cardRect.sizeDelta.y}");
Logging.Debug($"[AlbumCardPlacementDraggable] Tween complete for extracted card {card.name}, final height: {cardRect.sizeDelta.y}");
onComplete?.Invoke();
});
}
@@ -191,9 +192,6 @@ namespace UI.CardSystem
protected override void OnPointerUpHook(bool longPress)
{
base.OnPointerUpHook(longPress);
Debug.Log($"[CLICK-TRACE-PLACEMENT] OnPointerUpHook on {name}, _wasDragged={_wasDragged}, _isRevealed={_isRevealed}, _waitingForPlacementTap={_waitingForPlacementTap}, longPress={longPress}");
_isHolding = false;
// Cancel hold timer if running
@@ -202,40 +200,35 @@ namespace UI.CardSystem
StopCoroutine(_holdRevealCoroutine);
_holdRevealCoroutine = null;
}
else
{
}
// Handle tap (not dragged)
if (!_wasDragged)
{
if (!_isRevealed)
{
Debug.Log($"[CLICK-TRACE-PLACEMENT] {name} - First tap, revealing card");
// First tap: reveal the card
RevealCard();
_waitingForPlacementTap = true;
}
else if (_waitingForPlacementTap)
{
Debug.Log($"[CLICK-TRACE-PLACEMENT] {name} - Second tap, snapping to slot");
// Second tap: snap to slot
_waitingForPlacementTap = false;
SnapToAlbumSlot();
}
else
{
Debug.Log($"[CLICK-TRACE-PLACEMENT] {name} - Tap after reveal but not waiting for placement tap");
}
}
else if (_isDragRevealing)
{
Debug.Log($"[CLICK-TRACE-PLACEMENT] {name} - Was drag-revealed, auto-snapping");
// Was drag-revealed, auto-snap on release
_isDragRevealing = false;
SnapToAlbumSlot();
}
else
{
Debug.Log($"[CLICK-TRACE-PLACEMENT] {name} - Was dragged but no special handling");
}
}
/// <summary>
@@ -250,7 +243,6 @@ namespace UI.CardSystem
{
RevealCard();
_isDragRevealing = true;
Debug.Log("[AlbumCardDraggable] Card revealed via hold");
}
_holdRevealCoroutine = null;

View File

@@ -1,4 +1,5 @@
using AppleHills.Data.CardSystem;
using Core;
using Data.CardSystem;
using UI.DragAndDrop.Core;
using UnityEngine;
@@ -133,7 +134,7 @@ namespace UI.CardSystem
// Keep preview hidden - it'll show when user taps to enlarge
previewCardDisplay.gameObject.SetActive(false);
Debug.Log($"[AlbumCardSlot] Setup preview card for {targetCardDefinition.Name} (hidden until tap)");
Logging.Debug($"[AlbumCardSlot] Setup preview card for {targetCardDefinition.Name} (hidden until tap)");
}
/// <summary>
@@ -152,7 +153,7 @@ namespace UI.CardSystem
// Guard: need prefab to spawn
if (albumCardPrefab == null)
{
Debug.LogWarning($"[AlbumCardSlot] No albumCardPrefab assigned for slot targeting {targetCardDefinition.name}");
Logging.Warning($"[AlbumCardSlot] No albumCardPrefab assigned for slot targeting {targetCardDefinition.name}");
return;
}
@@ -213,11 +214,11 @@ namespace UI.CardSystem
albumPage.RegisterAlbumCard(albumCard);
}
Debug.Log($"[AlbumCardSlot] Spawned owned card '{cardData.Name}' ({cardData.Rarity}) in slot");
Logging.Debug($"[AlbumCardSlot] Spawned owned card '{cardData.Name}' ({cardData.Rarity}) in slot");
}
else
{
Debug.LogWarning($"[AlbumCardSlot] Spawned prefab has no AlbumCard component!");
Logging.Warning($"[AlbumCardSlot] Spawned prefab has no AlbumCard component!");
Destroy(cardObj);
}
}
@@ -235,30 +236,30 @@ namespace UI.CardSystem
/// </summary>
public void OnPointerClick(PointerEventData eventData)
{
Debug.Log($"[CLICK-TRACE-SLOT] OnPointerClick on {name}, _isOccupiedPermanently={_isOccupiedPermanently}, _placedCard={((_placedCard != null) ? _placedCard.name : "NULL")}, _isPreviewShowing={_isPreviewShowing}, position={eventData.position}");
Logging.Debug($"[CLICK-TRACE-SLOT] OnPointerClick on {name}, _isOccupiedPermanently={_isOccupiedPermanently}, _placedCard={((_placedCard != null) ? _placedCard.name : "NULL")}, _isPreviewShowing={_isPreviewShowing}, position={eventData.position}");
// Only handle clicks if slot is empty
if (_isOccupiedPermanently || _placedCard != null)
{
Debug.Log($"[CLICK-TRACE-SLOT] {name} - Slot is occupied, ignoring");
Logging.Debug($"[CLICK-TRACE-SLOT] {name} - Slot is occupied, ignoring");
return;
}
// Only handle if we have a preview card setup
if (previewCardDisplay == null || targetCardDefinition == null)
{
Debug.Log($"[CLICK-TRACE-SLOT] {name} - No preview setup, ignoring");
Logging.Debug($"[CLICK-TRACE-SLOT] {name} - No preview setup, ignoring");
return;
}
if (_isPreviewShowing)
{
Debug.Log($"[CLICK-TRACE-SLOT] {name} - Preview is showing, hiding it");
Logging.Debug($"[CLICK-TRACE-SLOT] {name} - Preview is showing, hiding it");
HidePreview();
}
else
{
Debug.Log($"[CLICK-TRACE-SLOT] {name} - Preview is hidden, showing it");
Logging.Debug($"[CLICK-TRACE-SLOT] {name} - Preview is hidden, showing it");
ShowPreview();
}
}
@@ -293,7 +294,7 @@ namespace UI.CardSystem
Pixelplacement.Tween.LocalScale(previewCardDisplay.transform, _previewOriginalScale * previewEnlargedScale,
previewScaleDuration, 0f, Pixelplacement.Tween.EaseOutBack);
Debug.Log($"[AlbumCardSlot] Showing preview for {targetCardDefinition.Name}");
Logging.Debug($"[AlbumCardSlot] Showing preview for {targetCardDefinition.Name}");
}
/// <summary>
@@ -340,11 +341,11 @@ namespace UI.CardSystem
// Hide the preview card after returning to slot
previewCardDisplay.gameObject.SetActive(false);
Debug.Log($"[AlbumCardSlot] Preview hidden and reset for {targetCardDefinition.Name}");
Logging.Debug($"[AlbumCardSlot] Preview hidden and reset for {targetCardDefinition.Name}");
});
}
Debug.Log($"[AlbumCardSlot] Hiding preview for {targetCardDefinition.Name}");
Logging.Debug($"[AlbumCardSlot] Hiding preview for {targetCardDefinition.Name}");
}
/// <summary>
@@ -352,7 +353,7 @@ namespace UI.CardSystem
/// </summary>
public void DismissPreview()
{
Debug.Log($"[CLICK-TRACE-SLOT] DismissPreview called on {name}");
Logging.Debug($"[CLICK-TRACE-SLOT] DismissPreview called on {name}");
HidePreview();
}

View File

@@ -1,4 +1,5 @@
using UI.DragAndDrop.Core;
using Core;
using UI.DragAndDrop.Core;
using UnityEngine;
namespace UI.CardSystem.DragDrop
@@ -127,10 +128,10 @@ namespace UI.CardSystem.DragDrop
/// </summary>
public void SetInOpeningSlot(bool inSlot)
{
Debug.Log($"[BoosterPackDraggable] SetInOpeningSlot({inSlot}) called on {name}");
Logging.Debug($"[BoosterPackDraggable] SetInOpeningSlot({inSlot}) called on {name}");
SetDraggingEnabled(!inSlot); // Disable dragging when in opening slot
Debug.Log($"[BoosterPackDraggable] SetDraggingEnabled({!inSlot}) called");
Logging.Debug($"[BoosterPackDraggable] SetDraggingEnabled({!inSlot}) called");
canTapToOpen = inSlot; // Enable tap-to-open when in opening slot

View File

@@ -1,5 +1,6 @@
using System;
using AppleHills.Data.CardSystem;
using Core;
using Pixelplacement;
using Pixelplacement.TweenSystem;
using UnityEngine;
@@ -260,12 +261,12 @@ namespace UI.CardSystem
public void OnPointerClick(PointerEventData eventData)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] OnPointerClick on {name}, _isClickable={_isClickable}, _isWaitingForTap={_isWaitingForTap}, _isFlipped={_isFlipped}, position={eventData.position}");
Logging.Debug($"[CLICK-TRACE-FLIPPABLE] OnPointerClick on {name}, _isClickable={_isClickable}, _isWaitingForTap={_isWaitingForTap}, _isFlipped={_isFlipped}, position={eventData.position}");
// If not clickable, notify and return
if (!_isClickable)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Not clickable, firing OnClickedWhileInactive");
Logging.Debug($"[CLICK-TRACE-FLIPPABLE] {name} - Not clickable, firing OnClickedWhileInactive");
OnClickedWhileInactive?.Invoke(this);
return;
}
@@ -273,7 +274,7 @@ namespace UI.CardSystem
// If waiting for tap after reveal, handle that
if (_isWaitingForTap)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Waiting for tap, dismissing enlarged state");
Logging.Debug($"[CLICK-TRACE-FLIPPABLE] {name} - Waiting for tap, dismissing enlarged state");
OnCardTappedAfterReveal?.Invoke(this);
_isWaitingForTap = false;
return;
@@ -281,11 +282,11 @@ namespace UI.CardSystem
if (_isFlipped || _isFlipping)
{
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Ignoring click (flipped={_isFlipped}, flipping={_isFlipping})");
Logging.Debug($"[CLICK-TRACE-FLIPPABLE] {name} - Ignoring click (flipped={_isFlipped}, flipping={_isFlipping})");
return;
}
Debug.Log($"[CLICK-TRACE-FLIPPABLE] {name} - Processing click, starting flip");
Logging.Debug($"[CLICK-TRACE-FLIPPABLE] {name} - Processing click, starting flip");
// Flip on click
FlipToReveal();
}
@@ -341,7 +342,7 @@ namespace UI.CardSystem
/// </summary>
private void TriggerUpgradeTransition(AppleHills.Data.CardSystem.CardData lowerRarityCard)
{
Debug.Log($"[FlippableCard] Triggering upgrade transition from {lowerRarityCard.Rarity}!");
Logging.Debug($"[FlippableCard] Triggering upgrade transition from {lowerRarityCard.Rarity}!");
AppleHills.Data.CardSystem.CardRarity oldRarity = lowerRarityCard.Rarity;
AppleHills.Data.CardSystem.CardRarity newRarity = oldRarity + 1;
@@ -429,7 +430,7 @@ namespace UI.CardSystem
if (newCardText != null)
newCardText.SetActive(true);
Debug.Log($"[FlippableCard] Card upgraded from {oldRarity} to {newRarity}! Showing as NEW.");
Logging.Debug($"[FlippableCard] Card upgraded from {oldRarity} to {newRarity}! Showing as NEW.");
// Card is already enlarged from the repeat display, so no need to enlarge again
}
@@ -457,7 +458,7 @@ namespace UI.CardSystem
TransitionToNewCardView(newRarity);
});
Debug.Log($"[FlippableCard] Card upgraded from {oldRarity} to {newRarity}! Showing progress {ownedAtNewRarity}/5");
Logging.Debug($"[FlippableCard] Card upgraded from {oldRarity} to {newRarity}! Showing progress {ownedAtNewRarity}/5");
}
/// <summary>
@@ -465,7 +466,7 @@ namespace UI.CardSystem
/// </summary>
private void TransitionToNewCardView(AppleHills.Data.CardSystem.CardRarity newRarity)
{
Debug.Log($"[FlippableCard] Transitioning to NEW CARD view at {newRarity} rarity");
Logging.Debug($"[FlippableCard] Transitioning to NEW CARD view at {newRarity} rarity");
// Update the CardDisplay to show new rarity
if (cardDisplay != null && _cardData != null)
@@ -488,7 +489,7 @@ namespace UI.CardSystem
_isNew = true;
_isWaitingForTap = true;
Debug.Log($"[FlippableCard] Now showing as NEW CARD at {newRarity}, waiting for tap");
Logging.Debug($"[FlippableCard] Now showing as NEW CARD at {newRarity}, waiting for tap");
}
/// <summary>
@@ -538,7 +539,7 @@ namespace UI.CardSystem
// Check if we have the required number of elements (should match cardsToUpgrade)
if (progressElements.Length < cardsToUpgrade)
{
Debug.LogWarning($"[FlippableCard] Not enough Image components in progress bar! Expected {cardsToUpgrade}, found {progressElements.Length}");
Logging.Warning($"[FlippableCard] Not enough Image components in progress bar! Expected {cardsToUpgrade}, found {progressElements.Length}");
onComplete?.Invoke();
return;
}
@@ -647,7 +648,7 @@ namespace UI.CardSystem
{
if (albumCard == null)
{
Debug.LogWarning("[FlippableCard] Cannot extract AlbumCard - none found!");
Logging.Warning("[FlippableCard] Cannot extract AlbumCard - none found!");
return null;
}
@@ -661,7 +662,7 @@ namespace UI.CardSystem
albumCard.SetupCard(_cardData);
}
Debug.Log($"[FlippableCard] Extracted AlbumCard '{_cardData?.Name}' to {newParent.name} - ready for tween");
Logging.Debug($"[FlippableCard] Extracted AlbumCard '{_cardData?.Name}' to {newParent.name} - ready for tween");
return albumCard;
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections;
using Core;
using Data.CardSystem;
using Pixelplacement;
using UnityEngine;
@@ -10,7 +11,8 @@ namespace UI.CardSystem
/// <summary>
/// Singleton UI component for granting booster packs from minigames.
/// Displays a booster pack with glow effect, waits for user to click continue,
/// then animates the pack flying to bottom-left corner before granting the reward.
/// then shows the scrapbook button and animates the pack flying to it before granting the reward.
/// The scrapbook button is automatically hidden after the animation completes.
/// </summary>
public class MinigameBoosterGiver : MonoBehaviour
{
@@ -45,7 +47,7 @@ namespace UI.CardSystem
// Singleton pattern
if (Instance != null && Instance != this)
{
Debug.LogWarning("[MinigameBoosterGiver] Duplicate instance found. Destroying.");
Logging.Warning("[MinigameBoosterGiver] Duplicate instance found. Destroying.");
Destroy(gameObject);
return;
}
@@ -98,7 +100,7 @@ namespace UI.CardSystem
{
if (_currentSequence != null)
{
Debug.LogWarning("[MinigameBoosterGiver] Already running a sequence. Ignoring new request.");
Logging.Warning("[MinigameBoosterGiver] Already running a sequence. Ignoring new request.");
return;
}
@@ -187,23 +189,61 @@ namespace UI.CardSystem
yield break;
}
// Calculate bottom-left corner position in local space
RectTransform canvasRect = GetComponentInParent<Canvas>()?.GetComponent<RectTransform>();
Vector3 targetPosition;
if (canvasRect != null)
// Show scrapbook button temporarily using HUD visibility context
PlayerHudManager.HudVisibilityContext hudContext = null;
GameObject scrapbookButton = null;
scrapbookButton = PlayerHudManager.Instance.GetScrabookButton();
if (scrapbookButton != null)
{
// Convert bottom-left corner with offset to local position
Vector2 bottomLeft = new Vector2(-canvasRect.rect.width / 2f, -canvasRect.rect.height / 2f);
targetPosition = bottomLeft + targetBottomLeftOffset;
hudContext = PlayerHudManager.Instance.ShowElementTemporarily(scrapbookButton);
}
else
{
// Fallback if no canvas found
targetPosition = _boosterInitialPosition + new Vector3(-500f, -500f, 0f);
Logging.Warning("[MinigameBoosterGiver] Scrapbook button not found in PlayerHudManager.");
}
// Tween to bottom-left corner
// Calculate target position - use scrapbook button position if available
Vector3 targetPosition;
if (scrapbookButton != null)
{
// Get the scrapbook button's position in the same coordinate space as boosterImage
RectTransform scrapbookRect = scrapbookButton.GetComponent<RectTransform>();
if (scrapbookRect != null)
{
// Convert scrapbook button's world position to local position relative to boosterImage's parent
Canvas canvas = GetComponentInParent<Canvas>();
if (canvas != null && canvas.renderMode == RenderMode.ScreenSpaceOverlay)
{
// For overlay canvas, convert screen position to local position
Vector2 screenPos = RectTransformUtility.WorldToScreenPoint(null, scrapbookRect.position);
RectTransformUtility.ScreenPointToLocalPointInRectangle(
boosterImage.parent as RectTransform,
screenPos,
null,
out Vector2 localPoint);
targetPosition = localPoint;
}
else
{
// For world space or camera canvas
targetPosition = boosterImage.parent.InverseTransformPoint(scrapbookRect.position);
}
}
else
{
Logging.Warning("[MinigameBoosterGiver] Scrapbook button has no RectTransform, using fallback position.");
targetPosition = GetFallbackPosition();
}
}
else
{
// Fallback to bottom-left corner
targetPosition = GetFallbackPosition();
}
// Tween to scrapbook button position
Tween.LocalPosition(boosterImage, targetPosition, disappearDuration, 0f, Tween.EaseInBack);
// Scale down
@@ -217,13 +257,16 @@ namespace UI.CardSystem
if (CardSystemManager.Instance != null)
{
CardSystemManager.Instance.AddBoosterPack(1);
Debug.Log("[MinigameBoosterGiver] Booster pack granted!");
Logging.Debug("[MinigameBoosterGiver] Booster pack granted!");
}
else
{
Debug.LogWarning("[MinigameBoosterGiver] CardSystemManager not found, cannot grant booster pack.");
Logging.Warning("[MinigameBoosterGiver] CardSystemManager not found, cannot grant booster pack.");
}
// Hide scrapbook button by disposing the context
hudContext?.Dispose();
// Hide the visual
if (visualContainer != null)
{
@@ -237,6 +280,22 @@ namespace UI.CardSystem
// Clear sequence reference
_currentSequence = null;
}
private Vector3 GetFallbackPosition()
{
RectTransform canvasRect = GetComponentInParent<Canvas>()?.GetComponent<RectTransform>();
if (canvasRect != null)
{
// Convert bottom-left corner with offset to local position
Vector2 bottomLeft = new Vector2(-canvasRect.rect.width / 2f, -canvasRect.rect.height / 2f);
return bottomLeft + targetBottomLeftOffset;
}
else
{
// Ultimate fallback if no canvas found
return _boosterInitialPosition + new Vector3(-500f, -500f, 0f);
}
}
}
}

View File

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
using UI.DragAndDrop.Core;
using Core;
using UI.DragAndDrop.Core;
using UnityEngine;
namespace UI.CardSystem
@@ -22,7 +23,7 @@ namespace UI.CardSystem
if (container == null || objects == null || objects.Count == 0)
return;
Debug.Log($"[SlotContainerHelper] Shuffling {objects.Count} objects to front slots");
Logging.Debug($"[SlotContainerHelper] Shuffling {objects.Count} objects to front slots");
// Unassign all objects from their current slots
foreach (var obj in objects)
@@ -41,12 +42,12 @@ namespace UI.CardSystem
if (targetSlot != null)
{
Debug.Log($"[SlotContainerHelper] Assigning object to slot with SlotIndex {i}");
Logging.Debug($"[SlotContainerHelper] Assigning object to slot with SlotIndex {i}");
obj.AssignToSlot(targetSlot, animate);
}
else
{
Debug.LogWarning($"[SlotContainerHelper] Could not find slot with SlotIndex {i}");
Logging.Warning($"[SlotContainerHelper] Could not find slot with SlotIndex {i}");
}
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections;
using Core;
using Pixelplacement;
using UnityEngine;
using UnityEngine.EventSystems;
@@ -79,10 +80,10 @@ namespace UI.DragAndDrop.Core
protected virtual void Initialize()
{
Debug.Log($"[DraggableObject] Initializing {name} at world pos {transform.position}, local pos {transform.localPosition}, parent: {(transform.parent != null ? transform.parent.name : "NULL")}");
Logging.Debug($"[DraggableObject] Initializing {name} at world pos {transform.position}, local pos {transform.localPosition}, parent: {(transform.parent != null ? transform.parent.name : "NULL")}");
_canvas = GetComponentInParent<Canvas>();
Debug.Log($"[DraggableObject] {name} found canvas: {(_canvas != null ? _canvas.name : "NULL")}, canvas pos: {(_canvas != null ? _canvas.transform.position.ToString() : "N/A")}");
Logging.Debug($"[DraggableObject] {name} found canvas: {(_canvas != null ? _canvas.name : "NULL")}, canvas pos: {(_canvas != null ? _canvas.transform.position.ToString() : "N/A")}");
_imageComponent = GetComponent<Image>();
_canvasGroup = GetComponent<CanvasGroup>();
@@ -95,7 +96,7 @@ namespace UI.DragAndDrop.Core
_imageComponent = gameObject.AddComponent<Image>();
_imageComponent.color = new Color(1, 1, 1, 0.01f); // Nearly transparent (0 doesn't work)
_imageComponent.raycastTarget = true;
Debug.Log($"[DraggableObject] Added invisible Image to {name} for raycast detection");
Logging.Debug($"[DraggableObject] Added invisible Image to {name} for raycast detection");
}
// Use assigned visual, or find in children recursively if not assigned
@@ -190,19 +191,19 @@ namespace UI.DragAndDrop.Core
if (eventData.button != PointerEventData.InputButton.Left)
return;
Debug.Log($"[DraggableObject] OnBeginDrag called on {name}. _isDraggingEnabled={_isDraggingEnabled}");
Logging.Debug($"[DraggableObject] OnBeginDrag called on {name}. _isDraggingEnabled={_isDraggingEnabled}");
// Check if dragging is enabled BEFORE setting any state
if (!_isDraggingEnabled)
{
Debug.Log($"[DraggableObject] OnBeginDrag blocked - dragging disabled on {name}");
Logging.Debug($"[DraggableObject] OnBeginDrag blocked - dragging disabled on {name}");
return;
}
_isDragging = true;
_wasDragged = true;
Debug.Log($"[DraggableObject] Drag started on {name}");
Logging.Debug($"[DraggableObject] Drag started on {name}");
// ...existing code...
if (_canvas != null && _canvas.renderMode == RenderMode.ScreenSpaceOverlay && RectTransform != null)
@@ -413,7 +414,7 @@ namespace UI.DragAndDrop.Core
if (slot == null)
return;
Debug.Log($"[DraggableObject] Assigning {name} to slot {slot.name}, animate={animate}, current pos={transform.position}, slot pos={slot.transform.position}");
Logging.Debug($"[DraggableObject] Assigning {name} to slot {slot.name}, animate={animate}, current pos={transform.position}, slot pos={slot.transform.position}");
DraggableSlot previousSlot = _currentSlot;
_currentSlot = slot;
@@ -429,7 +430,7 @@ namespace UI.DragAndDrop.Core
transform.SetParent(slot.transform);
transform.localPosition = _isSelected ? new Vector3(0, selectionOffset, 0) : Vector3.zero;
transform.localRotation = Quaternion.identity;
Debug.Log($"[DraggableObject] {name} assigned to slot {slot.name}, new world pos={transform.position}, local pos={transform.localPosition}");
Logging.Debug($"[DraggableObject] {name} assigned to slot {slot.name}, new world pos={transform.position}, local pos={transform.localPosition}");
}
OnSlotChanged?.Invoke(this, slot);
@@ -510,14 +511,14 @@ namespace UI.DragAndDrop.Core
/// </summary>
public virtual void SetDraggingEnabled(bool enabled)
{
Debug.Log($"[DraggableObject] SetDraggingEnabled({enabled}) called on {name}. _isDragging={_isDragging}, _isDraggingEnabled={_isDraggingEnabled}");
Logging.Debug($"[DraggableObject] SetDraggingEnabled({enabled}) called on {name}. _isDragging={_isDragging}, _isDraggingEnabled={_isDraggingEnabled}");
_isDraggingEnabled = enabled;
// If disabling dragging while actively dragging, stop the drag
if (!enabled && _isDragging)
{
Debug.Log($"[DraggableObject] Stopping active drag on {name}");
Logging.Debug($"[DraggableObject] Stopping active drag on {name}");
_isDragging = false;
// Re-enable raycasting
@@ -529,7 +530,7 @@ namespace UI.DragAndDrop.Core
_canvasGroup.blocksRaycasts = true;
}
Debug.Log($"[DraggableObject] After SetDraggingEnabled: _isDragging={_isDragging}, _isDraggingEnabled={_isDraggingEnabled}");
Logging.Debug($"[DraggableObject] After SetDraggingEnabled: _isDragging={_isDragging}, _isDraggingEnabled={_isDraggingEnabled}");
}
#endregion

View File

@@ -1,4 +1,5 @@
using Pixelplacement;
using Core;
using Pixelplacement;
using Pixelplacement.TweenSystem;
using UnityEngine;
using UnityEngine.InputSystem; // Added for new Input System
@@ -67,14 +68,14 @@ namespace UI.DragAndDrop.Core
_parentDraggable = parent;
Canvas parentCanvas = parent.GetComponentInParent<Canvas>();
Debug.Log($"[DraggableVisual] Initializing visual for {parent.name} at world pos {parent.transform.position}, parent canvas: {(parentCanvas != null ? parentCanvas.name + " (renderMode: " + parentCanvas.renderMode + ")" : "NULL")}");
Logging.Debug($"[DraggableVisual] Initializing visual for {parent.name} at world pos {parent.transform.position}, parent canvas: {(parentCanvas != null ? parentCanvas.name + " (renderMode: " + parentCanvas.renderMode + ")" : "NULL")}");
// CRITICAL: Reparent visual to canvas (not base) so it can move independently
// This enables the delayed follow effect
if (parentCanvas != null)
{
transform.SetParent(parentCanvas.transform, true); // worldPositionStays = true
Debug.Log($"[DraggableVisual] Reparented visual {name} to canvas {parentCanvas.name} for independent movement");
Logging.Debug($"[DraggableVisual] Reparented visual {name} to canvas {parentCanvas.name} for independent movement");
}
// Get components if assigned (don't auto-create Canvas to avoid Unity's auto-reparenting)
@@ -106,7 +107,7 @@ namespace UI.DragAndDrop.Core
tiltParent.localRotation = Quaternion.identity;
}
Debug.Log($"[DraggableVisual] Visual {name} initialized at world pos {transform.position}, local pos {transform.localPosition}, local rotation {transform.localRotation.eulerAngles}, parent at world pos {parent.transform.position}, local pos {parent.transform.localPosition}, rotation {parent.transform.rotation.eulerAngles}");
Logging.Debug($"[DraggableVisual] Visual {name} initialized at world pos {transform.position}, local pos {transform.localPosition}, local rotation {transform.localRotation.eulerAngles}, parent at world pos {parent.transform.position}, local pos {parent.transform.localPosition}, rotation {parent.transform.rotation.eulerAngles}");
_isInitialized = true;
@@ -202,7 +203,7 @@ namespace UI.DragAndDrop.Core
float distance = Vector3.Distance(currentPosition, targetPosition);
if (distance > 500f)
{
Debug.LogWarning($"[DraggableVisual] Large position delta detected! Visual {name} at {currentPosition}, target {targetPosition}, parent {_parentDraggable.name}, distance: {distance}");
Logging.Warning($"[DraggableVisual] Large position delta detected! Visual {name} at {currentPosition}, target {targetPosition}, parent {_parentDraggable.name}, distance: {distance}");
}
// Apply follow logic with snappy easing

View File

@@ -1,4 +1,5 @@
using UI.Core;
using Core;
using UI.Core;
using UnityEngine;
using UnityEngine.UI;
@@ -53,7 +54,7 @@ namespace UI
return;
}
Debug.Log($"[HudMenuButton] {buttonName} opening page from prefab: {pagePrefab.name}");
Logging.Debug($"[HudMenuButton] {buttonName} opening page from prefab: {pagePrefab.name}");
UIPageController.Instance.PushPageFromPrefab(pagePrefab);
}

View File

@@ -421,6 +421,7 @@ namespace UI
{
SaveLoadManager.Instance.currentSaveData.participantStates.Clear();
SaveLoadManager.Instance.currentSaveData.unlockedMinigames.Clear();
SaveLoadManager.Instance.currentSaveData.playedDivingTutorial = false;
Logging.Debug("[PauseMenu] Cleared all save data from memory");
}

View File

@@ -7,6 +7,7 @@ using UnityEngine.Playables;
using UnityEngine.UI;
using System.Linq;
using System.Collections.Generic;
using System;
namespace UI
{
@@ -19,6 +20,73 @@ namespace UI
{
public enum UIMode { Overworld, Puzzle, Minigame, HideAll };
/// <summary>
/// Context object for managing temporary HUD element visibility.
/// Automatically restores previous visibility state when disposed.
/// Usage: using (var ctx = PlayerHudManager.Instance.ShowElementTemporarily(myButton)) { ... }
/// </summary>
public class HudVisibilityContext : IDisposable
{
private readonly GameObject _element;
private readonly bool _previousState;
private bool _disposed;
internal HudVisibilityContext(GameObject element, bool show)
{
_element = element;
_previousState = element.activeSelf;
_element.SetActive(show);
}
public void Dispose()
{
if (_disposed) return;
_disposed = true;
if (_element != null)
{
_element.SetActive(_previousState);
}
}
}
/// <summary>
/// Multi-element visibility context for managing multiple HUD elements at once.
/// Automatically restores previous visibility states when disposed.
/// </summary>
public class MultiHudVisibilityContext : IDisposable
{
private readonly List<(GameObject element, bool previousState)> _elements;
private bool _disposed;
internal MultiHudVisibilityContext(IEnumerable<GameObject> elements, bool show)
{
_elements = new List<(GameObject, bool)>();
foreach (var element in elements)
{
if (element != null)
{
_elements.Add((element, element.activeSelf));
element.SetActive(show);
}
}
}
public void Dispose()
{
if (_disposed) return;
_disposed = true;
foreach (var (element, previousState) in _elements)
{
if (element != null)
{
element.SetActive(previousState);
}
}
}
}
public UIMode currentUIMode;
[Header("HUD Management")]
@@ -33,6 +101,7 @@ namespace UI
[Header("HUD Elements")]
public GameObject eagleEye;
public GameObject ramaSjangButton;
public GameObject scrabBookButton;
[HideInInspector] public Image cinematicSprites;
[HideInInspector] public Image cinematicBackgroundSprites;
@@ -254,6 +323,9 @@ namespace UI
if (visible)
{
eagleEye.SetActive(false);
ramaSjangButton.SetActive(false);
scrabBookButton.SetActive(false);
}
break;
case UIMode.HideAll:
@@ -318,6 +390,64 @@ namespace UI
UnityEngine.Debug.LogError("[PlayerHudManager] Cannot push page - UIPageController not found!");
}
}
#region HUD Element Getters
public GameObject GetEagleEye() => eagleEye;
public GameObject GetRamaSjangButton() => ramaSjangButton;
public GameObject GetScrabookButton() => scrabBookButton;
#endregion
#region Context-Based Visibility Management
/// <summary>
/// Temporarily shows a HUD element. Returns a context object that restores the previous state when disposed.
/// Usage: using (var ctx = PlayerHudManager.Instance.ShowElementTemporarily(myButton)) { /* element is visible */ }
/// </summary>
public HudVisibilityContext ShowElementTemporarily(GameObject element)
{
if (element == null)
{
Logging.Warning("[PlayerHudManager] Attempted to show null element");
return null;
}
return new HudVisibilityContext(element, true);
}
/// <summary>
/// Temporarily hides a HUD element. Returns a context object that restores the previous state when disposed.
/// Usage: using (var ctx = PlayerHudManager.Instance.HideElementTemporarily(myButton)) { /* element is hidden */ }
/// </summary>
public HudVisibilityContext HideElementTemporarily(GameObject element)
{
if (element == null)
{
Logging.Warning("[PlayerHudManager] Attempted to hide null element");
return null;
}
return new HudVisibilityContext(element, false);
}
/// <summary>
/// Temporarily shows multiple HUD elements. Returns a context object that restores all previous states when disposed.
/// Usage: using (var ctx = PlayerHudManager.Instance.ShowElementsTemporarily(button1, button2, button3)) { /* elements are visible */ }
/// </summary>
public MultiHudVisibilityContext ShowElementsTemporarily(params GameObject[] elements)
{
return new MultiHudVisibilityContext(elements, true);
}
/// <summary>
/// Temporarily hides multiple HUD elements. Returns a context object that restores all previous states when disposed.
/// Usage: using (var ctx = PlayerHudManager.Instance.HideElementsTemporarily(button1, button2, button3)) { /* elements are hidden */ }
/// </summary>
public MultiHudVisibilityContext HideElementsTemporarily(params GameObject[] elements)
{
return new MultiHudVisibilityContext(elements, false);
}
#endregion
}
}

View File

@@ -15,6 +15,6 @@ public class ScrapbookController : MonoBehaviour
public void DebugClick()
{
// Debug.Log("Yey I was clicked!");
// Logging.Debug("Yey I was clicked!");
}
}

View File

@@ -6,6 +6,7 @@ using Input;
using Pixelplacement;
using UI.Core;
using UnityEngine;
using UnityEngine.Audio;
namespace UI.Tutorial
{
@@ -19,6 +20,8 @@ namespace UI.Tutorial
private StateMachine _stateMachine;
public bool playTutorial;
public AudioSource bottleAudioPlayer;
public AudioResource introVO;
[SerializeField] private ProgressType progressType = ProgressType.Auto;
// gating for input until current state's animation finishes first loop
@@ -59,7 +62,7 @@ namespace UI.Tutorial
void RemoveTutorial()
{
Debug.Log("Remove me!");
Logging.Debug("Remove me!");
if (_waitLoopCoroutine != null)
{
StopCoroutine(_waitLoopCoroutine);
@@ -76,6 +79,8 @@ namespace UI.Tutorial
tapPrompt.SetActive(false);
Destroy(gameObject);
bottleAudioPlayer.resource = introVO;
bottleAudioPlayer.Play();
}
public void OnTap(Vector2 position)

View File

@@ -101,7 +101,7 @@ namespace Utils
}
catch (System.Exception ex)
{
Debug.LogWarning($"[AppleHillsUtils] Error checking addressable key existence: {ex.Message}");
Logging.Warning($"[AppleHillsUtils] Error checking addressable key existence: {ex.Message}");
return false;
}
}

View File

@@ -1,6 +1,5 @@
{
"dependencies": {
"com.ammariqais.skiaforunity": "https://github.com/ammariqais/SkiaForUnity.git?path=SkiaUnity/Assets/SkiaSharp",
"com.coplaydev.unity-mcp": "https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity",
"com.moolt.packages.net": "git+https://github.com/Moolt/UnityAudioSourceEvents?path=Packages/AudioSourceEvents",
"com.unity.2d.sprite": "1.0.0",

View File

@@ -1,14 +1,5 @@
{
"dependencies": {
"com.ammariqais.skiaforunity": {
"version": "https://github.com/ammariqais/SkiaForUnity.git?path=SkiaUnity/Assets/SkiaSharp",
"depth": 0,
"source": "git",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.2.0"
},
"hash": "11e82b71012bf8b4f68172080d6e4969d42120ef"
},
"com.coplaydev.unity-mcp": {
"version": "https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity",
"depth": 0,

View File

@@ -12,8 +12,8 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: AppleHills
companyName: DR
productName: "DR \xC6blerup"
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -142,7 +142,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 1.0.2
bundleVersion: 1.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
@@ -168,7 +168,7 @@ PlayerSettings:
Android: com.DefaultCompany.com.unity.template.mobile2D
Lumin: com.DefaultCompany.com.unity.template.mobile2D
Standalone: com.DefaultCompany.com.unity.template.mobile2D
iPhone: com.DefaultCompany.com.unity.template.mobile2D
iPhone: dk.dr.ramasjang.aeblerup
tvOS: com.DefaultCompany.com.unity.template.mobile2D
buildNumber:
Standalone: 0
@@ -403,25 +403,31 @@ PlayerSettings:
m_SubKind:
- m_BuildTarget: iPhone
m_Icons:
- m_Textures:
- {fileID: 2800000, guid: a8ae11f948f0cfa4791e954c315376ee, type: 3}
m_Width: 1024
m_Height: 1024
m_Kind: 4
m_SubKind: App Store
- m_Textures: []
m_Width: 120
m_Height: 120
m_Kind: 3
m_Width: 60
m_Height: 60
m_Kind: 2
m_SubKind: iPhone
- m_Textures: []
m_Width: 80
m_Height: 80
m_Kind: 3
m_SubKind: iPhone
- m_Textures: []
m_Width: 80
m_Height: 80
m_Kind: 3
m_SubKind: iPad
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 3
m_Kind: 2
m_SubKind: iPhone
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 2
m_SubKind: iPad
- m_Textures: []
m_Width: 20
m_Height: 20
m_Kind: 2
m_SubKind: iPad
- m_Textures: []
m_Width: 87
@@ -449,30 +455,25 @@ PlayerSettings:
m_Kind: 1
m_SubKind: iPad
- m_Textures: []
m_Width: 60
m_Height: 60
m_Kind: 2
m_Width: 120
m_Height: 120
m_Kind: 3
m_SubKind: iPhone
- m_Textures: []
m_Width: 80
m_Height: 80
m_Kind: 3
m_SubKind: iPhone
- m_Textures: []
m_Width: 80
m_Height: 80
m_Kind: 3
m_SubKind: iPad
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 2
m_SubKind: iPhone
- m_Textures: []
m_Width: 40
m_Height: 40
m_Kind: 2
m_Kind: 3
m_SubKind: iPad
- m_Textures: []
m_Width: 20
m_Height: 20
m_Kind: 2
m_SubKind: iPad
- m_Textures: []
m_Width: 1024
m_Height: 1024
m_Kind: 4
m_SubKind: App Store
- m_Textures:
- {fileID: 2800000, guid: a8ae11f948f0cfa4791e954c315376ee, type: 3}
m_Width: 180
@@ -507,6 +508,9 @@ PlayerSettings:
- m_BuildTarget: Android
m_StaticBatching: 1
m_DynamicBatching: 0
- m_BuildTarget: iPhone
m_StaticBatching: 1
m_DynamicBatching: 0
m_BuildTargetShaderSettings: []
m_BuildTargetGraphicsJobs:
- m_BuildTarget: MacStandaloneSupport
@@ -836,7 +840,7 @@ PlayerSettings:
webEnableSubmoduleStrippingCompatibility: 0
scriptingDefineSymbols:
Android: ENABLE_LOG
iPhone: __UNIFIED__;__IOS__
iPhone:
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend: