Working card dragging into album slots, persistent slots

This commit is contained in:
Michal Pikulski
2025-11-07 11:24:19 +01:00
parent 0d8702a5f6
commit 77f7d1ee97
21 changed files with 5093 additions and 3257 deletions

5
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,5 @@
You are an expert code architect and developer. YOu prioritize clean, efficient, and maintainable code.
You priotize up-front though out planning before writing code.
You will always present implementaiton plan first and always ask for permission to implement it.
Never insert zero-width spaces or non-breaking spaces in my code.
DOn't produce .MD documentation unless i ask you to.

File diff suppressed because it is too large Load Diff

View File

@@ -26,13 +26,12 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 498445838423597154} m_GameObject: {fileID: 498445838423597154}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 5027301639700053608} - {fileID: 5027301639700053608}
- {fileID: 6998531714563205983}
- {fileID: 2081116343754364062} - {fileID: 2081116343754364062}
- {fileID: 4830022034953347571} - {fileID: 4830022034953347571}
- {fileID: 7968396929263690413} - {fileID: 7968396929263690413}
@@ -70,7 +69,6 @@ MonoBehaviour:
PageName: Booster Opening Page PageName: Booster Opening Page
transitionDuration: 0.3 transitionDuration: 0.3
canvasGroup: {fileID: 7671014600744692184} canvasGroup: {fileID: 7671014600744692184}
closeButton: {fileID: 9195578165816196696}
boosterPackPrefab: {fileID: 1439929750438628637, guid: cff5eaa9e8cc26a439e7b36345916468, type: 3} boosterPackPrefab: {fileID: 1439929750438628637, guid: cff5eaa9e8cc26a439e7b36345916468, type: 3}
bottomRightSlots: {fileID: 415627682025321105} bottomRightSlots: {fileID: 415627682025321105}
centerOpeningSlot: {fileID: 3371630871680769077} centerOpeningSlot: {fileID: 3371630871680769077}
@@ -81,6 +79,7 @@ MonoBehaviour:
boosterDisappearDuration: 0.5 boosterDisappearDuration: 0.5
impulseSource: {fileID: 4448843358972162772} impulseSource: {fileID: 4448843358972162772}
openingParticleSystem: {fileID: 0} openingParticleSystem: {fileID: 0}
albumIcon: {fileID: 0}
--- !u!114 &4448843358972162772 --- !u!114 &4448843358972162772
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -404,138 +403,6 @@ MonoBehaviour:
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
curveHeight: 50 curveHeight: 50
--- !u!1 &6017052972121068920
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6998531714563205983}
- component: {fileID: 7990422945290858532}
- component: {fileID: 8362552417907629651}
- component: {fileID: 9195578165816196696}
m_Layer: 0
m_Name: ExitButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6998531714563205983
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6017052972121068920}
m_LocalRotation: {x: -0, y: -0, z: -0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5228380266581535650}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 106, y: -98}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7990422945290858532
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6017052972121068920}
m_CullTransparentMesh: 1
--- !u!114 &8362552417907629651
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6017052972121068920}
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: 607773040016097035, guid: ee014bd71cac2bc4ab845f435726f383, 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!114 &9195578165816196696
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6017052972121068920}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8362552417907629651}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 0}
m_TargetAssemblyTypeName: UI.CardSystem.AlbumViewPage, AppleHillsScripts
m_MethodName: ExitAlbum
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
--- !u!1001 &610246570171281800 --- !u!1001 &610246570171281800
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -968,7 +835,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6647899082618247385, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} - target: {fileID: 6647899082618247385, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3}
propertyPath: hideImageOnPlay propertyPath: hideImageOnPlay
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6647899082618247385, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} - target: {fileID: 6647899082618247385, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3}
propertyPath: occupantScale.x propertyPath: occupantScale.x

View File

@@ -1,6 +1,6 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &1275563675283742273 --- !u!1 &3697348702925017591
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@@ -8,321 +8,208 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 4689562168107797719} - component: {fileID: 8576570241677955255}
- component: {fileID: 1691790559549813443} - component: {fileID: 5397984527285824388}
m_Layer: 0 - component: {fileID: 5080215318866393190}
m_Layer: 5
m_Name: AlbumCard m_Name: AlbumCard
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!224 &4689562168107797719 --- !u!224 &8576570241677955255
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1275563675283742273} m_GameObject: {fileID: 3697348702925017591}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 7701563473015326516} - {fileID: 593327658551090324}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 540} m_SizeDelta: {x: 0, y: 540}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1691790559549813443 --- !u!114 &5397984527285824388
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1275563675283742273} m_GameObject: {fileID: 3697348702925017591}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 706803638ea24880bae19c87d3851ce6, type: 3} m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCardDraggable m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.AspectRatioFitter
moveSpeed: 1500 m_AspectMode: 2
smoothMovement: 0 m_AspectRatio: 0.7407407
snapDuration: 0.3 --- !u!114 &5080215318866393190
visual: {fileID: 0} MonoBehaviour:
isSelectable: 1 m_ObjectHideFlags: 0
selectionOffset: 10 m_CorrespondingSourceObject: {fileID: 0}
flippableCard: {fileID: 3814888273534605961} m_PrefabInstance: {fileID: 0}
holdRevealDelay: 0.3 m_PrefabAsset: {fileID: 0}
--- !u!1001 &9020921157083249943 m_GameObject: {fileID: 3697348702925017591}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 258a530448814715b5ec19737df2a658, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCard
cardDisplay: {fileID: 3062738042043309247}
backdropImage: {fileID: 0}
enlargedScale: 2.5
scaleDuration: 0.3
--- !u!1001 &2530689326119009629
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 4689562168107797719} m_TransformParent: {fileID: 8576570241677955255}
m_Modifications: m_Modifications:
- target: {fileID: 1217866542791508741, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 790099756778783334, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_fontSize
value: 55
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 1802458852284665438, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_Pivot.y propertyPath: m_Pivot.y
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMax.x propertyPath: m_AnchorMax.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMin.x propertyPath: m_AnchorMin.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2170561336081419296, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5533787515014034956, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_Name
value: Card
objectReference: {fileID: 0}
- target: {fileID: 7441149886460635393, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_fontSize
value: 55
objectReference: {fileID: 0}
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMax.x propertyPath: m_AnchorMax.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2170561336081419296, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2170561336081419296, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2170561336081419296, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5605972516071022591, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7971762251737130074, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9030846195633449058, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9060030918047515996, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_Name
value: FlippableCardPrefab
objectReference: {fileID: 0}
- target: {fileID: 9060030918047515996, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
--- !u!114 &3814888273534605961 stripped --- !u!224 &593327658551090324 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
m_PrefabInstance: {fileID: 2530689326119009629}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3062738042043309247 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} m_CorrespondingSourceObject: {fileID: 693510968212398562, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
m_PrefabInstance: {fileID: 9020921157083249943} m_PrefabInstance: {fileID: 2530689326119009629}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0} m_GameObject: {fileID: 0}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ffa05ec4ecbd4cc485e2127683c29f09, type: 3} m_Script: {fileID: 11500000, guid: 72cb26621865420aa763a66c06eb7f6d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.FlippableCard m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.CardDisplay
--- !u!224 &7701563473015326516 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
m_PrefabInstance: {fileID: 9020921157083249943}
m_PrefabAsset: {fileID: 0}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: aca553283b12f314795f62d785d01912 guid: 1d8cc8d9238eec34b8e600e7050e2979
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -111,7 +111,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 540} m_SizeDelta: {x: 0, y: 540}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2515648508668674600 --- !u!114 &2515648508668674600
MonoBehaviour: MonoBehaviour:
@@ -130,10 +130,11 @@ MonoBehaviour:
hideImageOnPlay: 0 hideImageOnPlay: 0
filterByType: 0 filterByType: 0
allowedTypeNames: [] allowedTypeNames: []
occupantSizeMode: 1 occupantSizeMode: 0
occupantScale: {x: 1, y: 1, z: 1} occupantScale: {x: 1, y: 1, z: 1}
scaleTransitionDuration: 0.3 scaleTransitionDuration: 0.3
targetCardDefinition: {fileID: 0} targetCardDefinition: {fileID: 0}
albumCardPrefab: {fileID: 3697348702925017591, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
--- !u!114 &5397984527285824388 --- !u!114 &5397984527285824388
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -0,0 +1,358 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1275563675283742273
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4689562168107797719}
- component: {fileID: 1691790559549813443}
m_Layer: 0
m_Name: AlbumPlacementCard
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4689562168107797719
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1275563675283742273}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7701563473015326516}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 540}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1691790559549813443
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1275563675283742273}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 706803638ea24880bae19c87d3851ce6, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCardDraggable
moveSpeed: 1500
smoothMovement: 0
snapDuration: 0.3
visual: {fileID: 0}
isSelectable: 1
selectionOffset: 10
flippableCard: {fileID: 3814888273534605961}
holdRevealDelay: 0.3
--- !u!1001 &9020921157083249943
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 4689562168107797719}
m_Modifications:
- target: {fileID: 800304281239603981, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3944615060647018691, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3944615060647018691, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3944615060647018691, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5044057968005998777, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: albumCard
value:
objectReference: {fileID: 5164901602697649867}
- target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: cardDisplay
value:
objectReference: {fileID: 3147152248387533330}
- target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: enableIdleHover
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: idleHoverHeight
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6193987373793698945, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7308531005971043100, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9060030918047515996, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
propertyPath: m_Name
value: FlippableCardPrefab
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
--- !u!114 &3147152248387533330 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6240953021224011525, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
m_PrefabInstance: {fileID: 9020921157083249943}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72cb26621865420aa763a66c06eb7f6d, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.CardDisplay
--- !u!114 &3814888273534605961 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
m_PrefabInstance: {fileID: 9020921157083249943}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ffa05ec4ecbd4cc485e2127683c29f09, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.FlippableCard
--- !u!114 &5164901602697649867 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4223766615757628380, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
m_PrefabInstance: {fileID: 9020921157083249943}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 258a530448814715b5ec19737df2a658, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCard
--- !u!224 &7701563473015326516 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3}
m_PrefabInstance: {fileID: 9020921157083249943}
m_PrefabAsset: {fileID: 0}

View File

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

View File

@@ -243,7 +243,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 6667510642920868813} - {fileID: 800304281239603981}
m_Father: {fileID: 1716378143019989539} m_Father: {fileID: 1716378143019989539}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@@ -1015,7 +1015,8 @@ MonoBehaviour:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.FlippableCard m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.FlippableCard
cardBackObject: {fileID: 2592418251725585151} cardBackObject: {fileID: 2592418251725585151}
cardFrontObject: {fileID: 2691095965985708622} cardFrontObject: {fileID: 2691095965985708622}
cardDisplay: {fileID: 9096468343956982758} cardDisplay: {fileID: 6240953021224011525}
albumCard: {fileID: 4223766615757628380}
enableIdleHover: 1 enableIdleHover: 1
idleHoverHeight: 10 idleHoverHeight: 10
idleHoverDuration: 1.5 idleHoverDuration: 1.5
@@ -1028,7 +1029,7 @@ MonoBehaviour:
progressBarContainer: {fileID: 1938654216571238436} progressBarContainer: {fileID: 1938654216571238436}
cardsToUpgrade: 5 cardsToUpgrade: 5
enlargedScale: 1.5 enlargedScale: 1.5
--- !u!1001 &8620731150807558660 --- !u!1001 &8943403053347003322
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
@@ -1036,136 +1037,139 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1318588240326811233} m_TransformParent: {fileID: 1318588240326811233}
m_Modifications: m_Modifications:
- target: {fileID: 790099756778783334, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 1833043711021369510, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1802458852284665438, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 3019715237329649467, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 3697348702925017591, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_Name
value: AlbumCard
objectReference: {fileID: 0}
- target: {fileID: 4187589325650506499, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_Pivot.y propertyPath: m_Pivot.y
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMax.x propertyPath: m_AnchorMax.x
value: 1 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMin.x propertyPath: m_AnchorMin.x
value: 0 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 0 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 540
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 16
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5533787515014034956, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_Name
value: Card
objectReference: {fileID: 0}
- target: {fileID: 7441149886460635393, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_fontSize
value: 55
objectReference: {fileID: 0}
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
--- !u!224 &6667510642920868813 stripped --- !u!224 &800304281239603981 stripped
RectTransform: RectTransform:
m_CorrespondingSourceObject: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} m_CorrespondingSourceObject: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
m_PrefabInstance: {fileID: 8620731150807558660} m_PrefabInstance: {fileID: 8943403053347003322}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &9096468343956982758 stripped --- !u!114 &4223766615757628380 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 693510968212398562, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} m_CorrespondingSourceObject: {fileID: 5080215318866393190, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
m_PrefabInstance: {fileID: 8620731150807558660} m_PrefabInstance: {fileID: 8943403053347003322}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 258a530448814715b5ec19737df2a658, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCard
--- !u!114 &6240953021224011525 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3062738042043309247, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3}
m_PrefabInstance: {fileID: 8943403053347003322}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0} m_GameObject: {fileID: 0}
m_Enabled: 1 m_Enabled: 1

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,172 @@
using System;
using AppleHills.Data.CardSystem;
using Pixelplacement;
using UnityEngine;
using UnityEngine.EventSystems;
namespace UI.CardSystem
{
/// <summary>
/// Album card component that wraps CardDisplay.
/// Handles tap-to-enlarge and tap-to-shrink interactions for cards placed in album slots.
///
/// TODO: Consider refactoring to state machine pattern (PendingReveal, PlacedInSlot, Enlarged)
/// This would eliminate the need for separate AlbumPlacementCard wrapper and simplify the hierarchy.
/// See design discussion with state transitions for cleaner architecture.
/// </summary>
public class AlbumCard : MonoBehaviour, IPointerClickHandler
{
[Header("References")]
[SerializeField] private CardDisplay cardDisplay;
[Header("Enlarge Settings")]
[SerializeField] private float enlargedScale = 2.5f;
[SerializeField] private float scaleDuration = 0.3f;
// Events for AlbumViewPage to manage backdrop and reparenting
public event Action<AlbumCard> OnEnlargeRequested;
public event Action<AlbumCard> OnShrinkRequested;
private AlbumCardSlot _parentSlot;
private CardData _cardData;
private bool _isEnlarged;
private Vector3 _originalScale;
private Transform _originalParent;
private Vector3 _originalLocalPosition;
private Quaternion _originalLocalRotation;
private void Awake()
{
// Auto-find CardDisplay if not assigned
if (cardDisplay == null)
{
cardDisplay = GetComponentInChildren<CardDisplay>();
}
// Store original scale
_originalScale = transform.localScale;
}
/// <summary>
/// Setup card with data
/// </summary>
public void SetupCard(CardData data)
{
_cardData = data;
if (cardDisplay != null)
{
cardDisplay.SetupCard(data);
}
}
/// <summary>
/// Set the parent slot this card belongs to
/// </summary>
public void SetParentSlot(AlbumCardSlot slot)
{
_parentSlot = slot;
}
/// <summary>
/// Get the card data
/// </summary>
public CardData GetCardData()
{
return _cardData;
}
/// <summary>
/// Handle tap on card - request enlarge/shrink from parent page
/// Only process clicks when card is placed in a slot (not during reveal flow)
/// </summary>
public void OnPointerClick(PointerEventData eventData)
{
// During reveal flow (before placed in slot), ignore clicks
// Let the parent FlippableCard handle them
if (_parentSlot == null)
return;
if (_isEnlarged)
{
OnShrinkRequested?.Invoke(this);
}
else
{
OnEnlargeRequested?.Invoke(this);
}
}
/// <summary>
/// Enlarge card (called by AlbumViewPage after reparenting)
/// </summary>
public void EnlargeCard()
{
if (_isEnlarged) return;
_isEnlarged = true;
// Store original transform info for restoration
_originalParent = transform.parent;
_originalLocalPosition = transform.localPosition;
_originalLocalRotation = transform.localRotation;
// Scale up with snappy tween
Tween.LocalScale(transform, _originalScale * enlargedScale, scaleDuration, 0f, Tween.EaseOutBack);
}
/// <summary>
/// Shrink card back to original size (called by AlbumViewPage before reparenting back)
/// </summary>
/// <param name="onComplete">Optional callback to invoke when shrink animation completes</param>
public void ShrinkCard(System.Action onComplete = null)
{
if (!_isEnlarged) return;
_isEnlarged = false;
// Scale back down with snappy tween, invoke callback when done
Tween.LocalScale(transform, _originalScale, scaleDuration, 0f, Tween.EaseInBack,
completeCallback: () => onComplete?.Invoke());
}
/// <summary>
/// Get original parent for restoration
/// </summary>
public Transform GetOriginalParent()
{
return _originalParent;
}
/// <summary>
/// Get original local position for restoration
/// </summary>
public Vector3 GetOriginalLocalPosition()
{
return _originalLocalPosition;
}
/// <summary>
/// Get original local rotation for restoration
/// </summary>
public Quaternion GetOriginalLocalRotation()
{
return _originalLocalRotation;
}
/// <summary>
/// Check if card is currently enlarged
/// </summary>
public bool IsEnlarged => _isEnlarged;
/// <summary>
/// Force reset enlarged state (for cleanup scenarios like page closing)
/// </summary>
public void ForceResetEnlargedState()
{
_isEnlarged = false;
transform.localScale = _originalScale;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 258a530448814715b5ec19737df2a658
timeCreated: 1762505823

View File

@@ -1,57 +0,0 @@
using AppleHills.Data.CardSystem;
using UI.DragAndDrop.Core;
using UnityEngine;
namespace UI.CardSystem
{
/// <summary>
/// Specialized slot for album pages that only accepts a specific card.
/// Validates cards based on their CardDefinition.
/// </summary>
public class AlbumCardSlot : DraggableSlot
{
[Header("Album Slot Configuration")]
[SerializeField] private CardDefinition targetCardDefinition; // Which card this slot accepts
private bool _isOccupiedPermanently = false;
/// <summary>
/// Set the target card this slot should accept
/// </summary>
public void SetTargetCard(CardDefinition definition)
{
targetCardDefinition = definition;
}
/// <summary>
/// Check if this slot can accept a specific card
/// </summary>
public bool CanAcceptCard(CardData cardData)
{
if (cardData == null || targetCardDefinition == null) return false;
if (_isOccupiedPermanently) return false;
// Card must match this slot's target definition
return cardData.DefinitionId == targetCardDefinition.Id;
}
/// <summary>
/// Called when a card is successfully placed in this slot
/// </summary>
public void OnCardPlaced()
{
_isOccupiedPermanently = true;
}
/// <summary>
/// Check if this slot has been permanently filled
/// </summary>
public bool IsOccupiedPermanently => _isOccupiedPermanently;
/// <summary>
/// Get the target card definition for this slot
/// </summary>
public CardDefinition TargetCardDefinition => targetCardDefinition;
}
}

View File

@@ -27,14 +27,18 @@ namespace UI.CardSystem
[Header("Album Card Reveal")] [Header("Album Card Reveal")]
[SerializeField] private SlotContainer bottomRightSlots; [SerializeField] private SlotContainer bottomRightSlots;
[SerializeField] private GameObject albumCardPrefab; [SerializeField] private GameObject albumCardPlacementPrefab; // The wrapper prefab with flip/drag (AlbumPlacementCard)
[Header("Card Enlarge System")]
[SerializeField] private GameObject cardEnlargedBackdrop; // Backdrop to block interactions
[SerializeField] private Transform cardEnlargedContainer; // Container for enlarged cards (sits above backdrop)
[Header("Booster Pack UI")] [Header("Booster Pack UI")]
[SerializeField] private GameObject[] boosterPackButtons; [SerializeField] private GameObject[] boosterPackButtons;
[SerializeField] private BoosterOpeningPage boosterOpeningPage; [SerializeField] private BoosterOpeningPage boosterOpeningPage;
private Input.InputMode _previousInputMode; private Input.InputMode _previousInputMode;
private List<AlbumCardDraggable> _activeCards = new List<AlbumCardDraggable>(); private List<AlbumCardPlacementDraggable> _activeCards = new List<AlbumCardPlacementDraggable>();
private const int MAX_VISIBLE_CARDS = 3; private const int MAX_VISIBLE_CARDS = 3;
private void Awake() private void Awake()
@@ -45,6 +49,12 @@ namespace UI.CardSystem
if (canvasGroup == null) if (canvasGroup == null)
canvasGroup = gameObject.AddComponent<CanvasGroup>(); canvasGroup = gameObject.AddComponent<CanvasGroup>();
// Hide backdrop initially
if (cardEnlargedBackdrop != null)
{
cardEnlargedBackdrop.SetActive(false);
}
// Set up exit button // Set up exit button
if (exitButton != null) if (exitButton != null)
{ {
@@ -242,6 +252,9 @@ namespace UI.CardSystem
protected override void DoTransitionOut(System.Action onComplete) protected override void DoTransitionOut(System.Action onComplete)
{ {
// Clean up any enlarged card state before closing
CleanupEnlargedCardState();
// Simple fade out animation // Simple fade out animation
if (canvasGroup != null) if (canvasGroup != null)
{ {
@@ -254,6 +267,43 @@ namespace UI.CardSystem
} }
} }
/// <summary>
/// Clean up enlarged card state when closing the album
/// </summary>
private void CleanupEnlargedCardState()
{
// Hide backdrop if visible
if (cardEnlargedBackdrop != null && cardEnlargedBackdrop.activeSelf)
{
cardEnlargedBackdrop.SetActive(false);
}
// If there's an enlarged card in the container, return it to its slot
if (cardEnlargedContainer != null && cardEnlargedContainer.childCount > 0)
{
// Get all enlarged cards (should only be one, but just in case)
for (int i = cardEnlargedContainer.childCount - 1; i >= 0; i--)
{
Transform cardTransform = cardEnlargedContainer.GetChild(i);
AlbumCard albumCard = cardTransform.GetComponent<AlbumCard>();
if (albumCard != null && albumCard.IsEnlarged)
{
// Force reset state and return to slot
Transform originalParent = albumCard.GetOriginalParent();
if (originalParent != null)
{
cardTransform.SetParent(originalParent, true);
cardTransform.localPosition = albumCard.GetOriginalLocalPosition();
cardTransform.localRotation = albumCard.GetOriginalLocalRotation();
}
albumCard.ForceResetEnlargedState();
}
}
}
}
#region Album Card Reveal System #region Album Card Reveal System
/// <summary> /// <summary>
@@ -262,7 +312,7 @@ namespace UI.CardSystem
/// </summary> /// </summary>
private void SpawnPendingCards() private void SpawnPendingCards()
{ {
if (CardSystemManager.Instance == null || bottomRightSlots == null || albumCardPrefab == null) if (CardSystemManager.Instance == null || bottomRightSlots == null || albumCardPlacementPrefab == null)
return; return;
var pending = CardSystemManager.Instance.GetPendingRevealCards(); var pending = CardSystemManager.Instance.GetPendingRevealCards();
@@ -306,26 +356,26 @@ namespace UI.CardSystem
// Instantiate card directly as child of the slot container (not the slot itself, not canvas root) // Instantiate card directly as child of the slot container (not the slot itself, not canvas root)
// This keeps it in the correct UI hierarchy // This keeps it in the correct UI hierarchy
GameObject cardObj = Instantiate(albumCardPrefab, bottomRightSlots.transform); GameObject cardObj = Instantiate(albumCardPlacementPrefab, bottomRightSlots.transform);
AlbumCardDraggable card = cardObj.GetComponent<AlbumCardDraggable>(); AlbumCardPlacementDraggable cardPlacement = cardObj.GetComponent<AlbumCardPlacementDraggable>();
if (card != null) if (cardPlacement != null)
{ {
// Setup card data // Setup card data
card.SetupCard(cardData); cardPlacement.SetupCard(cardData);
// Subscribe to events // Subscribe to events
card.OnCardRevealed += OnCardRevealed; cardPlacement.OnCardRevealed += OnCardRevealed;
card.OnCardPlacedInAlbum += OnCardPlacedInAlbum; cardPlacement.OnCardPlacedInAlbum += OnCardPlacedInAlbum;
// NOW assign to slot - this will: // NOW assign to slot - this will:
// 1. Reparent to slot // 1. Reparent to slot
// 2. Apply slot's occupantSizeMode scaling // 2. Apply slot's occupantSizeMode scaling
// 3. Animate to slot position // 3. Animate to slot position
card.AssignToSlot(slot, true); cardPlacement.AssignToSlot(slot, true);
// Track it // Track it
_activeCards.Add(card); _activeCards.Add(cardPlacement);
Debug.Log($"[AlbumViewPage] Spawned card '{cardData.Name}' (CopiesOwned: {cardData.CopiesOwned}) in slot {slotIndex}"); Debug.Log($"[AlbumViewPage] Spawned card '{cardData.Name}' (CopiesOwned: {cardData.CopiesOwned}) in slot {slotIndex}");
} }
@@ -371,7 +421,7 @@ namespace UI.CardSystem
/// <summary> /// <summary>
/// Handle when a card is revealed (flipped) /// Handle when a card is revealed (flipped)
/// </summary> /// </summary>
private void OnCardRevealed(AlbumCardDraggable card, CardData cardData) private void OnCardRevealed(AlbumCardPlacementDraggable cardPlacement, CardData cardData)
{ {
Debug.Log($"[AlbumViewPage] Card revealed: {cardData.Name} (Zone: {cardData.Zone}, CopiesOwned: {cardData.CopiesOwned})"); Debug.Log($"[AlbumViewPage] Card revealed: {cardData.Name} (Zone: {cardData.Zone}, CopiesOwned: {cardData.CopiesOwned})");
@@ -383,7 +433,7 @@ namespace UI.CardSystem
} }
// Remove this card from active cards list // Remove this card from active cards list
_activeCards.Remove(card); _activeCards.Remove(cardPlacement);
// Check if we're currently viewing the correct zone for this card // Check if we're currently viewing the correct zone for this card
CardZone currentZone = GetCurrentZone(); CardZone currentZone = GetCurrentZone();
@@ -409,13 +459,13 @@ namespace UI.CardSystem
/// Card data already moved to inventory in OnCardRevealed /// Card data already moved to inventory in OnCardRevealed
/// This just handles cleanup /// This just handles cleanup
/// </summary> /// </summary>
private void OnCardPlacedInAlbum(AlbumCardDraggable card, CardData cardData) private void OnCardPlacedInAlbum(AlbumCardPlacementDraggable cardPlacement, CardData cardData)
{ {
Debug.Log($"[AlbumViewPage] Card placed in album slot: {cardData.Name}"); Debug.Log($"[AlbumViewPage] Card placed in album slot: {cardData.Name}");
// Unsubscribe from events (card is now static in album) // Unsubscribe from events (card is now static in album)
card.OnCardRevealed -= OnCardRevealed; cardPlacement.OnCardRevealed -= OnCardRevealed;
card.OnCardPlacedInAlbum -= OnCardPlacedInAlbum; cardPlacement.OnCardPlacedInAlbum -= OnCardPlacedInAlbum;
// Note: Card already removed from _activeCards in OnCardRevealed // Note: Card already removed from _activeCards in OnCardRevealed
// Note: Shuffle and spawn already done in OnCardRevealed // Note: Shuffle and spawn already done in OnCardRevealed
@@ -560,5 +610,91 @@ namespace UI.CardSystem
} }
#endregion #endregion
#region Card Enlarge System
/// <summary>
/// Subscribe to album card events when a card is spawned in a slot
/// Call this when AlbumCardSlot spawns a card
/// </summary>
public void RegisterAlbumCard(AlbumCard albumCard)
{
if (albumCard == null) return;
albumCard.OnEnlargeRequested += OnCardEnlargeRequested;
albumCard.OnShrinkRequested += OnCardShrinkRequested;
}
/// <summary>
/// Unsubscribe from album card events
/// </summary>
public void UnregisterAlbumCard(AlbumCard albumCard)
{
if (albumCard == null) return;
albumCard.OnEnlargeRequested -= OnCardEnlargeRequested;
albumCard.OnShrinkRequested -= OnCardShrinkRequested;
}
/// <summary>
/// Handle card enlarge request - show backdrop and reparent card
/// </summary>
private void OnCardEnlargeRequested(AlbumCard card)
{
if (card == null) return;
Debug.Log($"[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
card.EnlargeCard();
// Show backdrop
if (cardEnlargedBackdrop != null)
{
cardEnlargedBackdrop.SetActive(true);
Debug.Log($"[AlbumViewPage] Backdrop shown");
}
// NOW reparent card to enlarged container (above backdrop)
if (cardEnlargedContainer != null)
{
card.transform.SetParent(cardEnlargedContainer, true);
card.transform.SetAsLastSibling(); // Ensure on top
Debug.Log($"[AlbumViewPage] Card reparented to enlarged container");
}
Debug.Log($"[AlbumViewPage] Card enlarged: {card.GetCardData()?.Name}");
}
/// <summary>
/// Handle card shrink request - hide backdrop and reparent card back to slot
/// </summary>
private void OnCardShrinkRequested(AlbumCard card)
{
if (card == null) return;
// Trigger shrink animation
card.ShrinkCard();
// Hide backdrop
if (cardEnlargedBackdrop != null)
{
cardEnlargedBackdrop.SetActive(false);
}
// Reparent back to original parent (the slot)
Transform originalParent = card.GetOriginalParent();
if (originalParent != null)
{
card.transform.SetParent(originalParent, true);
card.transform.localPosition = card.GetOriginalLocalPosition();
card.transform.localRotation = card.GetOriginalLocalRotation();
}
Debug.Log($"[AlbumViewPage] Card shrunk: {card.GetCardData()?.Name}");
}
#endregion
} }
} }

View File

@@ -2,6 +2,7 @@
using System.Collections; using System.Collections;
using AppleHills.Data.CardSystem; using AppleHills.Data.CardSystem;
using Data.CardSystem; using Data.CardSystem;
using Pixelplacement;
using UI.DragAndDrop.Core; using UI.DragAndDrop.Core;
using UnityEngine; using UnityEngine;
@@ -12,7 +13,7 @@ namespace UI.CardSystem
/// Handles both tap and drag-hold interactions for revealing cards. /// Handles both tap and drag-hold interactions for revealing cards.
/// Auto-snaps to matching album slot on release/tap. /// Auto-snaps to matching album slot on release/tap.
/// </summary> /// </summary>
public class AlbumCardDraggable : DraggableObject public class AlbumCardPlacementDraggable : DraggableObject
{ {
[Header("Album Card Settings")] [Header("Album Card Settings")]
[SerializeField] private FlippableCard flippableCard; [SerializeField] private FlippableCard flippableCard;
@@ -26,8 +27,8 @@ namespace UI.CardSystem
private bool _isHolding = false; // Track if pointer is currently down private bool _isHolding = false; // Track if pointer is currently down
// Events // Events
public event Action<AlbumCardDraggable, CardData> OnCardRevealed; public event Action<AlbumCardPlacementDraggable, CardData> OnCardRevealed;
public event Action<AlbumCardDraggable, CardData> OnCardPlacedInAlbum; public event Action<AlbumCardPlacementDraggable, CardData> OnCardPlacedInAlbum;
public CardData CardData => _cardData; public CardData CardData => _cardData;
public bool IsRevealed => _isRevealed; public bool IsRevealed => _isRevealed;
@@ -81,7 +82,7 @@ namespace UI.CardSystem
{ {
if (_cardData == null) if (_cardData == null)
{ {
Debug.LogWarning("[AlbumCardDraggable] Cannot snap to slot - no card data assigned."); Debug.LogWarning("[AlbumCardPlacementDraggable] Cannot snap to slot - no card data assigned.");
return; return;
} }
@@ -100,22 +101,77 @@ namespace UI.CardSystem
if (matchingSlot != null) if (matchingSlot != null)
{ {
// Assign to slot with animation
AssignToSlot(matchingSlot, true);
// Mark slot as permanently occupied
matchingSlot.OnCardPlaced();
// Disable dragging - card is now static in album
SetDraggingEnabled(false); SetDraggingEnabled(false);
// Notify that card was placed // NEW FLOW: Extract AlbumCard FIRST, then tween it
// Note: Card already moved from pending to inventory in OnCardRevealed if (flippableCard != null)
OnCardPlacedInAlbum?.Invoke(this, _cardData); {
AlbumCard extractedCard = flippableCard.ExtractAlbumCard(matchingSlot.transform);
if (extractedCard != null)
{
// Notify slot that card was placed
matchingSlot.OnCardPlaced(extractedCard);
// NOW tween the extracted AlbumCard into position
TweenExtractedCardToSlot(extractedCard, () =>
{
// After animation completes
Debug.Log($"[AlbumCardPlacementDraggable] Card placement animation complete for {_cardData.Name}");
// Notify that card was placed
OnCardPlacedInAlbum?.Invoke(this, _cardData);
// Destroy this wrapper (the AlbumPlacementCard)
Destroy(gameObject);
});
}
else
{
Debug.LogWarning("[AlbumCardPlacementDraggable] Failed to extract AlbumCard from wrapper!");
}
}
} }
else else
{ {
Debug.LogWarning($"[AlbumCardDraggable] Could not find matching slot for card '{_cardData.Name}' (Zone: {_cardData.Zone}, Index: {_cardData.CollectionIndex})"); Debug.LogWarning($"[AlbumCardPlacementDraggable] Could not find matching slot for card '{_cardData.Name}' (Zone: {_cardData.Zone}, Index: {_cardData.CollectionIndex})");
}
}
/// <summary>
/// Tween the extracted AlbumCard into its slot position
/// Tweens from current size to slot size - AspectRatioFitter handles width
/// </summary>
private void TweenExtractedCardToSlot(AlbumCard card, System.Action onComplete)
{
Transform cardTransform = card.transform;
RectTransform cardRect = cardTransform as RectTransform;
if (cardRect != null)
{
// Get target height from slot
RectTransform slotRect = cardTransform.parent as RectTransform;
float targetHeight = slotRect != null ? slotRect.rect.height : cardRect.sizeDelta.y;
// Tween from current size to target size (AspectRatioFitter will adjust width)
Vector2 targetSize = new Vector2(cardRect.sizeDelta.x, targetHeight);
Tween.Size(cardRect, targetSize, snapDuration, 0f, Tween.EaseOutBack);
// Tween position and rotation to slot center
Tween.LocalPosition(cardRect, Vector3.zero, snapDuration, 0f, Tween.EaseOutBack);
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}");
onComplete?.Invoke();
});
}
else
{
// No RectTransform, just reset and call callback
cardTransform.localPosition = Vector3.zero;
cardTransform.localRotation = Quaternion.identity;
onComplete?.Invoke();
} }
} }

View File

@@ -0,0 +1,163 @@
using AppleHills.Data.CardSystem;
using Data.CardSystem;
using UI.DragAndDrop.Core;
using UnityEngine;
namespace UI.CardSystem
{
/// <summary>
/// Specialized slot for album pages that only accepts a specific card.
/// Validates cards based on their CardDefinition.
/// Self-populates with owned cards when enabled.
/// </summary>
public class AlbumCardSlot : DraggableSlot
{
[Header("Album Slot Configuration")]
[SerializeField] private CardDefinition targetCardDefinition; // Which card this slot accepts
[SerializeField] private GameObject albumCardPrefab; // Prefab to spawn when card is owned
private bool _isOccupiedPermanently = false;
private AlbumCard _placedCard;
/// <summary>
/// Set the target card this slot should accept
/// </summary>
public void SetTargetCard(CardDefinition definition)
{
targetCardDefinition = definition;
}
/// <summary>
/// Check if this slot can accept a specific card
/// </summary>
public bool CanAcceptCard(CardData cardData)
{
if (cardData == null || targetCardDefinition == null) return false;
if (_isOccupiedPermanently) return false;
// Card must match this slot's target definition
return cardData.DefinitionId == targetCardDefinition.Id;
}
/// <summary>
/// Called when a card is successfully placed in this slot
/// </summary>
public void OnCardPlaced(AlbumCard albumCard = null)
{
_isOccupiedPermanently = true;
if (albumCard != null)
{
_placedCard = albumCard;
albumCard.SetParentSlot(this);
// Register with AlbumViewPage for enlarge/shrink handling
AlbumViewPage albumPage = FindObjectOfType<AlbumViewPage>();
if (albumPage != null)
{
albumPage.RegisterAlbumCard(albumCard);
}
}
}
/// <summary>
/// Check if this slot has a placed card
/// </summary>
public bool HasPlacedCard()
{
return _placedCard != null;
}
/// <summary>
/// Get the placed card (if any)
/// </summary>
public AlbumCard GetPlacedCard()
{
return _placedCard;
}
private void OnEnable()
{
// Check if we should spawn a card for this slot
CheckAndSpawnOwnedCard();
}
/// <summary>
/// Check if player owns the card for this slot and spawn it if so
/// </summary>
private void CheckAndSpawnOwnedCard()
{
// Guard: need CardSystemManager and target definition
if (CardSystemManager.Instance == null || targetCardDefinition == null)
return;
// Guard: don't spawn if already occupied
if (_isOccupiedPermanently || _placedCard != null)
return;
// Guard: need prefab to spawn
if (albumCardPrefab == null)
{
Debug.LogWarning($"[AlbumCardSlot] No albumCardPrefab assigned for slot targeting {targetCardDefinition.name}");
return;
}
// Check if player owns this card at ANY rarity (prioritize highest rarity)
CardData ownedCard = null;
// Check in order: Legendary > Rare > Normal
foreach (CardRarity rarity in new[] { CardRarity.Legendary, CardRarity.Rare, CardRarity.Normal })
{
CardData card = CardSystemManager.Instance.GetCardInventory().GetCard(targetCardDefinition.Id, rarity);
if (card != null)
{
ownedCard = card;
break; // Found highest rarity owned
}
}
// Spawn card if owned
if (ownedCard != null)
{
SpawnAlbumCard(ownedCard);
}
}
/// <summary>
/// Spawn an AlbumCard in this slot
/// </summary>
private void SpawnAlbumCard(CardData cardData)
{
GameObject cardObj = Instantiate(albumCardPrefab, transform);
AlbumCard albumCard = cardObj.GetComponent<AlbumCard>();
if (albumCard != null)
{
albumCard.SetupCard(cardData);
albumCard.SetParentSlot(this);
_placedCard = albumCard;
_isOccupiedPermanently = true;
// Register with AlbumViewPage for enlarge/shrink handling
AlbumViewPage albumPage = FindObjectOfType<AlbumViewPage>();
if (albumPage != null)
{
albumPage.RegisterAlbumCard(albumCard);
}
Debug.Log($"[AlbumCardSlot] Spawned owned card '{cardData.Name}' ({cardData.Rarity}) in slot");
}
else
{
Debug.LogWarning($"[AlbumCardSlot] Spawned prefab has no AlbumCard component!");
Destroy(cardObj);
}
}
/// <summary>
/// Get the target card definition for this slot
/// </summary>
public CardDefinition TargetCardDefinition => targetCardDefinition;
}
}

View File

@@ -1,4 +1,4 @@
using System; using System;
using AppleHills.Data.CardSystem; using AppleHills.Data.CardSystem;
using Pixelplacement; using Pixelplacement;
using Pixelplacement.TweenSystem; using Pixelplacement.TweenSystem;
@@ -17,6 +17,7 @@ namespace UI.CardSystem
[SerializeField] private GameObject cardBackObject; // The card back visual [SerializeField] private GameObject cardBackObject; // The card back visual
[SerializeField] private GameObject cardFrontObject; // Your CardDisplay prefab instance [SerializeField] private GameObject cardFrontObject; // Your CardDisplay prefab instance
[SerializeField] private CardDisplay cardDisplay; // Reference to CardDisplay component [SerializeField] private CardDisplay cardDisplay; // Reference to CardDisplay component
[SerializeField] private AlbumCard albumCard; // Reference to nested AlbumCard (for album placement flow)
[Header("Idle Hover Animation")] [Header("Idle Hover Animation")]
[SerializeField] private bool enableIdleHover = true; [SerializeField] private bool enableIdleHover = true;
@@ -66,6 +67,12 @@ namespace UI.CardSystem
cardDisplay = cardFrontObject.GetComponent<CardDisplay>(); cardDisplay = cardFrontObject.GetComponent<CardDisplay>();
} }
// Auto-find AlbumCard if not assigned
if (albumCard == null)
{
albumCard = GetComponentInChildren<AlbumCard>();
}
// Card back: starts at 0° rotation (normal, facing camera, clickable) // Card back: starts at 0° rotation (normal, facing camera, clickable)
// Card front: starts at 180° rotation (flipped away, will rotate to 0° when revealed) // Card front: starts at 180° rotation (flipped away, will rotate to 0° when revealed)
if (cardBackObject != null) if (cardBackObject != null)
@@ -621,6 +628,36 @@ namespace UI.CardSystem
}); });
} }
/// <summary>
/// Extract the nested AlbumCard and reparent it to a new parent
/// Used when placing card in album slot - extracts the AlbumCard from this wrapper
/// The caller is responsible for tweening it to the final position
/// </summary>
/// <param name="newParent">The transform to reparent the AlbumCard to (typically the AlbumCardSlot)</param>
/// <returns>The extracted AlbumCard component, or null if not found</returns>
public AlbumCard ExtractAlbumCard(Transform newParent)
{
if (albumCard == null)
{
Debug.LogWarning("[FlippableCard] Cannot extract AlbumCard - none found!");
return null;
}
// Reparent AlbumCard to new parent (maintain world position temporarily)
// The caller will tween it to the final position
albumCard.transform.SetParent(newParent, true);
// Setup the card data on the AlbumCard
if (_cardData != null)
{
albumCard.SetupCard(_cardData);
}
Debug.Log($"[FlippableCard] Extracted AlbumCard '{_cardData?.Name}' to {newParent.name} - ready for tween");
return albumCard;
}
#endregion #endregion
private void OnDestroy() private void OnDestroy()