Stash half-assed work on testing scene

This commit is contained in:
Michal Pikulski
2025-11-12 11:58:01 +01:00
committed by Michal Pikulski
parent 39d5890db4
commit 4e7f774386
18 changed files with 3065 additions and 321 deletions

View File

@@ -1,5 +1,80 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &110780548994216615
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6572416611728775826}
- component: {fileID: 6678347853661374277}
- component: {fileID: 4281711542620405955}
m_Layer: 0
m_Name: CardBack
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6572416611728775826
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 110780548994216615}
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: 4503896703341276882}
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 &6678347853661374277
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 110780548994216615}
m_CullTransparentMesh: 1
--- !u!114 &4281711542620405955
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 110780548994216615}
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: -8246103488371625927, guid: fb6b9846cb4b3bd4ca8517a34a5f9a3c, 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 &1565159623673994156
GameObject:
m_ObjectHideFlags: 0
@@ -48,6 +123,142 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5f33526d9bb8458d8dc5ba41a88561da, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardAlbumEnlargedState
--- !u!1 &1677419794898066759
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 396611488925486955}
- component: {fileID: 1438434793336151630}
- component: {fileID: 4949889219724804271}
m_Layer: 0
m_Name: NewCardIdle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &396611488925486955
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677419794898066759}
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: 4335159925483322521}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: -0.15037778}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &1438434793336151630
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677419794898066759}
m_CullTransparentMesh: 1
--- !u!114 &4949889219724804271
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1677419794898066759}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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_text: New Card!
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4aca0db6ec111b5418bdc747168f9474, type: 2}
m_sharedMaterial: {fileID: -1441574381962284772, guid: 4aca0db6ec111b5418bdc747168f9474, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278255382
m_fontColor: {r: 0.08811355, g: 1, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 40.6
m_fontSizeBase: 75
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1872771620772328816
GameObject:
m_ObjectHideFlags: 0
@@ -80,8 +291,8 @@ RectTransform:
m_Children: []
m_Father: {fileID: 3515674721272278511}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: -0.05, y: 1.05}
m_AnchorMax: {x: 1.05, y: 1.3}
m_AnchorMin: {x: -0.05, y: 1}
m_AnchorMax: {x: 1.05, y: 1.2591852}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
@@ -148,7 +359,7 @@ MonoBehaviour:
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_VerticalAlignment: 1024
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
@@ -200,7 +411,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &7543107230258457149
RectTransform:
m_ObjectHideFlags: 0
@@ -212,7 +423,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 4056571390505181704}
m_Father: {fileID: 6260183383577703002}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -232,9 +444,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 257f0c81caa14481812a8ca0397bf567, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardEnlargedRepeatState
progressBarContainer: {fileID: 0}
progressBarFill: {fileID: 0}
progressText: {fileID: 0}
progressBar: {fileID: 3978597425434320322}
--- !u!1 &2175448647942322849
GameObject:
m_ObjectHideFlags: 0
@@ -263,7 +473,9 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 396611488925486955}
- {fileID: 4578832943685298003}
m_Father: {fileID: 6260183383577703002}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -283,6 +495,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 891aad90d6cc41869e497f94d1408859, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardRevealedState
newCardIdleBadge: {fileID: 1677419794898066759}
repeatCardIdleBadge: {fileID: 5211028806012679930}
--- !u!1 &4538038328151312871
GameObject:
m_ObjectHideFlags: 0
@@ -299,7 +513,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &3515674721272278511
RectTransform:
m_ObjectHideFlags: 0
@@ -333,7 +547,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardEnlargedNewState
newCardBadge: {fileID: 1872771620772328816}
--- !u!1 &5040512025305578585
--- !u!1 &5211028806012679930
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -341,55 +555,55 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 909688197411629577}
- component: {fileID: 6435459933534189938}
- component: {fileID: 8834109619530168092}
- component: {fileID: 4578832943685298003}
- component: {fileID: 3781919165314003554}
- component: {fileID: 7234059966273873302}
m_Layer: 0
m_Name: CardBack
m_Name: RepeatCardIdle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &909688197411629577
--- !u!224 &4578832943685298003
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5040512025305578585}
m_GameObject: {fileID: 5211028806012679930}
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: 2940213885666377823}
m_Father: {fileID: 4335159925483322521}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMin: {x: 0, y: -0.15037778}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6435459933534189938
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &3781919165314003554
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5040512025305578585}
m_GameObject: {fileID: 5211028806012679930}
m_CullTransparentMesh: 1
--- !u!114 &8834109619530168092
--- !u!114 &7234059966273873302
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5040512025305578585}
m_GameObject: {fileID: 5211028806012679930}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
@@ -398,16 +612,77 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: -8246103488371625927, guid: fb6b9846cb4b3bd4ca8517a34a5f9a3c, 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
m_text: Count increased!
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4aca0db6ec111b5418bdc747168f9474, type: 2}
m_sharedMaterial: {fileID: -1441574381962284772, guid: 4aca0db6ec111b5418bdc747168f9474, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278255382
m_fontColor: {r: 0.08811355, g: 1, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32.3
m_fontSizeBase: 75
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &5611296005305622910
GameObject:
m_ObjectHideFlags: 0
@@ -439,7 +714,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4503896703341276882}
- {fileID: 2940213885666377823}
- {fileID: 4335159925483322521}
- {fileID: 3515674721272278511}
- {fileID: 7543107230258457149}
@@ -550,56 +824,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b17e4e1d7139446c9c4e0a813067331c, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardDraggingState
--- !u!1 &5975047344170543257
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2940213885666377823}
- component: {fileID: 1348581377203342625}
m_Layer: 0
m_Name: FlippingState
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &2940213885666377823
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5975047344170543257}
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: 909688197411629577}
m_Father: {fileID: 6260183383577703002}
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!114 &1348581377203342625
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5975047344170543257}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7223d6cab8d94f74b00a6a538291850a, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardFlippingState
cardBackVisual: {fileID: 5040512025305578585}
--- !u!1 &6272111216074930954
GameObject:
m_ObjectHideFlags: 0
@@ -700,8 +924,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3b3126aaaa66448fa3d5bd772aaf5784, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.CardContext
cardDisplay: {fileID: 0}
cardAnimator: {fileID: 0}
cardDisplay: {fileID: 410247942733107320}
cardAnimator: {fileID: 8871437021056565164}
--- !u!114 &8871437021056565164
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -728,7 +952,7 @@ MonoBehaviour:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.Card
context: {fileID: 5882185627204126092}
animator: {fileID: 8871437021056565164}
stateMachine: {fileID: 0}
stateMachine: {fileID: 3191598984258052350}
initialState: IdleState
--- !u!1 &8567459193246203383
GameObject:
@@ -758,7 +982,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 6572416611728775826}
m_Father: {fileID: 6260183383577703002}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -778,7 +1003,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7da1bdc06be348f2979d3b92cc7ce723, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.States.CardIdleState
cardBackVisual: {fileID: 0}
cardBackVisual: {fileID: 110780548994216615}
enableIdleHover: 1
--- !u!1001 &877822430676136346
PrefabInstance:
@@ -905,8 +1130,252 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
--- !u!114 &410247942733107320 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 693510968212398562, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
m_PrefabInstance: {fileID: 877822430676136346}
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!224 &2813511775519641683 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
m_PrefabInstance: {fileID: 877822430676136346}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1648403500589347815
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 7543107230258457149}
m_Modifications:
- target: {fileID: 2111622773705306824, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2111622773705306824, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2111622773705306824, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2111622773705306824, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2111622773705306824, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2111622773705306824, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3003501824762097247, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3003501824762097247, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3003501824762097247, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3003501824762097247, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3003501824762097247, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3003501824762097247, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.x
value: 20
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.x
value: -30
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5730442312475707133, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5730442312475707133, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5730442312475707133, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5730442312475707133, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5730442312475707133, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5730442312475707133, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8137280556209245475, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_Name
value: ProgressBar
objectReference: {fileID: 0}
- target: {fileID: 9004345790622233676, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9004345790622233676, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9004345790622233676, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9004345790622233676, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9004345790622233676, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9004345790622233676, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9212690411364735305, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9212690411364735305, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9212690411364735305, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9212690411364735305, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9212690411364735305, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9212690411364735305, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
--- !u!114 &3978597425434320322 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2438311102500089381, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
m_PrefabInstance: {fileID: 1648403500589347815}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e91de41001c14101b8fa4216d6c7888b, type: 3}
m_Name:
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.ProgressBarController
--- !u!224 &4056571390505181704 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3}
m_PrefabInstance: {fileID: 1648403500589347815}
m_PrefabAsset: {fileID: 0}

View File

@@ -384,8 +384,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 3362949153200116207}
- component: {fileID: 8153313697767296345}
- component: {fileID: 2772269549968393395}
- component: {fileID: 3792049735601548967}
- component: {fileID: 2438311102500089381}
m_Layer: 0
m_Name: ProgressBar
m_TagString: Untagged
@@ -400,7 +400,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8137280556209245475}
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_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@@ -417,7 +417,7 @@ RectTransform:
m_AnchoredPosition: {x: -51, y: 0}
m_SizeDelta: {x: 30, y: 540}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &8153313697767296345
--- !u!114 &3792049735601548967
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -426,22 +426,24 @@ MonoBehaviour:
m_GameObject: {fileID: 8137280556209245475}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3}
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GridLayoutGroup
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_StartCorner: 3
m_StartAxis: 0
m_CellSize: {x: 30, y: 85}
m_Spacing: {x: 0, y: 24}
m_Constraint: 0
m_ConstraintCount: 2
--- !u!114 &2772269549968393395
m_Spacing: 5
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 1
--- !u!114 &2438311102500089381
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}

View File

@@ -0,0 +1,692 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 1
m_PVRFilteringGaussRadiusAO: 1
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &645794297
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 645794302}
- component: {fileID: 645794301}
- component: {fileID: 645794300}
- component: {fileID: 645794299}
- component: {fileID: 645794298}
m_Layer: 0
m_Name: CinemachineCamera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &645794298
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 645794297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 00b2d199b96b516448144ab30fb26aed, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Cinemachine::Unity.Cinemachine.CinemachineImpulseListener
ApplyAfter: 2
ChannelMask: 1
Gain: 1
Use2DDistance: 0
UseCameraSpace: 1
SignalCombinationMode: 0
ReactionSettings:
m_SecondaryNoise: {fileID: 0}
AmplitudeGain: 1
FrequencyGain: 1
Duration: 1
m_NoiseOffsets: {x: 0, y: 0, z: 0}
--- !u!114 &645794299
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 645794297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f453f694addf4275988fac205bc91968, type: 3}
m_Name:
m_EditorClassIdentifier:
BoundingShape2D: {fileID: 0}
Damping: 3
SlowingDistance: 20
OversizeWindow:
Enabled: 0
MaxWindowSize: 0
Padding: 0
m_LegacyMaxWindowSize: -2
--- !u!114 &645794300
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 645794297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b617507da6d07e749b7efdb34e1173e1, type: 3}
m_Name:
m_EditorClassIdentifier:
TrackerSettings:
BindingMode: 4
PositionDamping: {x: 2, y: 0.5, z: 1}
AngularDampingMode: 0
RotationDamping: {x: 1, y: 1, z: 1}
QuaternionDamping: 1
FollowOffset: {x: 0, y: 0, z: -10}
--- !u!114 &645794301
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 645794297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f9dfa5b682dcd46bda6128250e975f58, type: 3}
m_Name:
m_EditorClassIdentifier:
Priority:
Enabled: 0
m_Value: 0
OutputChannel: 1
StandbyUpdate: 2
m_StreamingVersion: 20241001
m_LegacyPriority: 0
Target:
TrackingTarget: {fileID: 0}
LookAtTarget: {fileID: 0}
CustomLookAtTarget: 0
Lens:
FieldOfView: 60
OrthographicSize: 15
NearClipPlane: 0.3
FarClipPlane: 1000
Dutch: 0
ModeOverride: 0
PhysicalProperties:
GateFit: 2
SensorSize: {x: 21.946, y: 16.002}
LensShift: {x: 0, y: 0}
FocusDistance: 10
Iso: 200
ShutterSpeed: 0.005
Aperture: 16
BladeCount: 5
Curvature: {x: 2, y: 11}
BarrelClipping: 0.25
Anamorphism: 0
BlendHint: 0
--- !u!4 &645794302
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 645794297}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -34.3, y: -36.3, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1026052543
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1026052548}
- component: {fileID: 1026052547}
- component: {fileID: 1026052546}
- component: {fileID: 1026052545}
- component: {fileID: 1026052544}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1026052544
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026052543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
m_Version: 2
--- !u!114 &1026052545
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026052543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowDebugText: 0
ShowCameraFrustum: 1
IgnoreTimeScale: 0
WorldUpOverride: {fileID: 0}
ChannelMask: -1
UpdateMethod: 2
BlendUpdateMethod: 1
LensModeOverride:
Enabled: 0
DefaultMode: 2
DefaultBlend:
Style: 1
Time: 2
CustomCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
CustomBlends: {fileID: 0}
--- !u!81 &1026052546
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026052543}
m_Enabled: 1
--- !u!20 &1026052547
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026052543}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 15
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1026052548
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026052543}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -34.3, y: -36.3, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1379185392
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1379185395}
- component: {fileID: 1379185394}
- component: {fileID: 1379185393}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1379185393
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379185392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.InputSystem::UnityEngine.InputSystem.UI.InputSystemUIInputModule
m_SendPointerHoverToParent: 1
m_MoveRepeatDelay: 0.5
m_MoveRepeatRate: 0.1
m_XRTrackingOrigin: {fileID: 0}
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
m_DeselectOnBackgroundClick: 1
m_PointerBehavior: 0
m_CursorLockBehavior: 0
m_ScrollDeltaPerTick: 6
--- !u!114 &1379185394
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379185392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.EventSystems.EventSystem
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1379185395
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379185392}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1424282866
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1424282867}
m_Layer: 5
m_Name: CardTestArea
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1424282867
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1424282866}
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: 2090466564}
m_Father: {fileID: 1427584483}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.3, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.99993896, y: 0}
m_SizeDelta: {x: 2, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1427584479
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1427584483}
- component: {fileID: 1427584482}
- component: {fileID: 1427584481}
- component: {fileID: 1427584480}
m_Layer: 5
m_Name: TestCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1427584480
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1427584479}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1427584481
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1427584479}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &1427584482
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1427584479}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1427584483
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1427584479}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1424282867}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &2090466563
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2090466564}
m_Layer: 5
m_Name: CardSpawnPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2090466564
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2090466563}
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: 1424282867}
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: 250}
m_SizeDelta: {x: 200, y: 280}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 1026052548}
- {fileID: 645794302}
- {fileID: 1427584483}
- {fileID: 1379185395}

View File

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

View File

@@ -10,10 +10,9 @@ namespace UI.CardSystem
/// Controls a vertical progress bar made of individual Image elements.
/// Fills from bottom to top and animates the newest element with a blink effect.
///
/// Setup: Place on GameObject with GridLayoutGroup (1 column, N rows).
/// Grid should have "Lower Right" corner start so first child = bottom element.
/// Setup: Place on GameObject with VerticalLayoutGroup (Reverse Arrangement enabled).
/// First child = first progress element (1/5), last child = last progress element (5/5).
/// </summary>
[RequireComponent(typeof(GridLayoutGroup))]
public class ProgressBarController : MonoBehaviour
{
[Header("Progress Elements")]
@@ -73,8 +72,8 @@ namespace UI.CardSystem
element.enabled = false;
}
// Enable elements from BOTTOM to TOP (first N elements)
// Since GridLayout starts at "Lower Right", element[0] = bottom, element[4] = top
// Enable first N elements (since first child = 1/5, last child = 5/5)
// If currentCount = 3, enable elements [0], [1], [2] (first 3 elements)
for (int i = 0; i < currentCount && i < _progressElements.Length; i++)
{
_progressElements[i].enabled = true;
@@ -82,7 +81,7 @@ namespace UI.CardSystem
Logging.Debug($"[ProgressBarController] Showing progress {currentCount}/{maxCount}");
// Blink the NEWEST element (the one we just added)
// Blink the NEWEST element (the last one we just enabled)
// Newest element is at index (currentCount - 1)
int newestIndex = currentCount - 1;
if (newestIndex >= 0 && newestIndex < _progressElements.Length && currentCount > 0)

View File

@@ -29,6 +29,7 @@ namespace UI.CardSystem.StateMachine
// Runtime state
public bool IsNewCard { get; set; }
public int RepeatCardCount { get; set; }
public bool IsClickable { get; set; } = true;
// Events for external coordination (BoosterOpeningPage, etc.)
public event Action<CardContext> OnFlipComplete;

View File

@@ -15,7 +15,6 @@ namespace UI.CardSystem.StateMachine.States
public class CardEnlargedRepeatState : AppleState, IPointerClickHandler
{
[Header("State-Owned Visuals")]
[SerializeField] private GameObject progressBarContainer;
[SerializeField] private ProgressBarController progressBar;
private CardContext _context;
@@ -35,21 +34,11 @@ namespace UI.CardSystem.StateMachine.States
_originalScale = _context.RootTransform.localScale;
_waitingForTap = false;
// Show progress bar container
if (progressBarContainer != null)
{
progressBarContainer.SetActive(true);
}
// Enlarge the card
if (_context.Animator != null)
{
_context.Animator.PlayEnlarge(_settings.NewCardEnlargedScale);
}
// Show progress with blink animation
// Show progress bar
if (progressBar != null)
{
progressBar.gameObject.SetActive(true);
int currentCount = _context.RepeatCardCount + 1; // +1 because we just got this card
int maxCount = _settings.CardsToUpgrade;
@@ -60,6 +49,12 @@ namespace UI.CardSystem.StateMachine.States
Logging.Warning("[CardEnlargedRepeatState] ProgressBar component not assigned!");
OnProgressComplete();
}
// Enlarge the card
if (_context.Animator != null)
{
_context.Animator.PlayEnlarge(_settings.NewCardEnlargedScale);
}
}
private void OnProgressComplete()
@@ -170,9 +165,9 @@ namespace UI.CardSystem.StateMachine.States
_context.IsNewCard = true;
// Hide progress bar before transitioning
if (progressBarContainer != null)
if (progressBar != null)
{
progressBarContainer.SetActive(false);
progressBar.gameObject.SetActive(false);
}
// Transition to EnlargedNewState (card is already enlarged, will show NEW badge)
@@ -205,9 +200,9 @@ namespace UI.CardSystem.StateMachine.States
private void OnDisable()
{
// Hide progress bar when leaving state
if (progressBarContainer != null)
if (progressBar != null)
{
progressBarContainer.SetActive(false);
progressBar.gameObject.SetActive(false);
}
}
}

View File

@@ -1,91 +0,0 @@
using Core.SaveLoad;
using UnityEngine;
namespace UI.CardSystem.StateMachine.States
{
/// <summary>
/// Flipping state - handles the card flip animation from back to front.
/// Owns the CardBackVisual as a child GameObject.
/// </summary>
public class CardFlippingState : AppleState
{
[Header("State-Owned Visuals")]
[SerializeField] private GameObject cardBackVisual;
private CardContext _context;
private void Awake()
{
_context = GetComponentInParent<CardContext>();
}
public override void OnEnterState()
{
// Activate card back, hide card front
if (cardBackVisual != null)
{
cardBackVisual.SetActive(true);
}
if (_context.CardDisplay != null)
{
_context.CardDisplay.gameObject.SetActive(false);
}
// Play flip animation + scale punch
if (_context.Animator != null)
{
_context.Animator.PlayFlip(
cardBack: cardBackVisual.transform,
cardFront: _context.CardDisplay.transform,
onComplete: OnFlipComplete
);
_context.Animator.PlayFlipScalePunch();
}
}
private void OnFlipComplete()
{
// Fire flip complete event
_context.FireFlipComplete();
// Transition based on whether this is a new card or repeat
if (_context.IsNewCard)
{
_context.StateMachine.ChangeState("EnlargedNewState");
}
else if (_context.CardData.Rarity == AppleHills.Data.CardSystem.CardRarity.Legendary)
{
// Legendary repeat - skip enlarge, they can't upgrade
// Add to inventory and move to revealed state
Data.CardSystem.CardSystemManager.Instance.AddCardToInventoryDelayed(_context.CardData);
_context.StateMachine.ChangeState("RevealedState");
}
else if (_context.RepeatCardCount > 0)
{
_context.StateMachine.ChangeState("EnlargedRepeatState");
}
else
{
_context.StateMachine.ChangeState("RevealedState");
}
}
private void OnDisable()
{
// Hide card back when leaving state
if (cardBackVisual != null)
{
cardBackVisual.SetActive(false);
}
// Ensure card front is visible
if (_context?.CardDisplay != null)
{
_context.CardDisplay.gameObject.SetActive(true);
}
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 7223d6cab8d94f74b00a6a538291850a
timeCreated: 1762884650

View File

@@ -82,13 +82,61 @@ namespace UI.CardSystem.StateMachine.States
public void OnPointerClick(PointerEventData eventData)
{
// Click to flip - transition to flipping state
_context.StateMachine.ChangeState("FlippingState");
// Check if card is clickable (prevents multi-flip in booster opening)
if (!_context.IsClickable)
{
Logging.Debug($"[CardIdleState] Card is not clickable, ignoring click");
return;
}
private void OnDisable()
// Stop idle hover and pointer interactions
StopIdleHover();
// Play flip animation directly (no state transition yet)
if (_context.Animator != null)
{
_context.Animator.PlayFlip(
cardBack: cardBackVisual != null ? cardBackVisual.transform : null,
cardFront: _context.CardDisplay != null ? _context.CardDisplay.transform : null,
onComplete: OnFlipComplete
);
_context.Animator.PlayFlipScalePunch();
}
}
private void OnFlipComplete()
{
// Fire flip complete event
_context.FireFlipComplete();
// Transition based on whether this is a new card or repeat
if (_context.IsNewCard)
{
_context.StateMachine.ChangeState("EnlargedNewState");
}
else if (_context.CardData != null && _context.CardData.Rarity == AppleHills.Data.CardSystem.CardRarity.Legendary)
{
// Legendary repeat - skip enlarge, they can't upgrade
// Add to inventory and move to revealed state
if (Data.CardSystem.CardSystemManager.Instance != null)
{
Data.CardSystem.CardSystemManager.Instance.AddCardToInventoryDelayed(_context.CardData);
}
_context.StateMachine.ChangeState("RevealedState");
}
else if (_context.RepeatCardCount > 0)
{
_context.StateMachine.ChangeState("EnlargedRepeatState");
}
else
{
_context.StateMachine.ChangeState("RevealedState");
}
}
private void StopIdleHover()
{
// Stop idle hover animation when leaving state
if (_idleHoverTween != null)
{
_idleHoverTween.Stop();
@@ -101,9 +149,15 @@ namespace UI.CardSystem.StateMachine.States
_context.Animator.AnimateAnchoredPosition(_originalPosition, 0.3f);
}
}
}
private void OnDisable()
{
// Stop idle hover animation when leaving state
StopIdleHover();
// Reset scale
if (_context.Animator != null)
if (_context?.Animator != null)
{
_context.Animator.AnimateScale(Vector3.one, 0.2f);
}

View File

@@ -1,4 +1,5 @@
using Core.SaveLoad;
using UnityEngine;
namespace UI.CardSystem.StateMachine.States
{
@@ -7,9 +8,14 @@ namespace UI.CardSystem.StateMachine.States
/// This is the "waiting" state:
/// - In booster flow: waiting for all cards to finish before animating to album
/// - In album placement flow: waiting to be dragged to a slot
/// Shows small idle badges for NEW or REPEAT cards.
/// </summary>
public class CardRevealedState : AppleState
{
[Header("State-Owned Visuals")]
[SerializeField] private UnityEngine.GameObject newCardIdleBadge;
[SerializeField] private UnityEngine.GameObject repeatCardIdleBadge;
private CardContext _context;
private void Awake()
@@ -20,9 +26,43 @@ namespace UI.CardSystem.StateMachine.States
public override void OnEnterState()
{
// Card is at normal size, fully revealed
// Show appropriate idle badge
if (_context.IsNewCard)
{
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(true);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(false);
}
else if (_context.RepeatCardCount > 0)
{
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(false);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(true);
}
else
{
// Neither new nor repeat - hide both
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(false);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(false);
}
// Fire interaction complete event (for BoosterOpeningPage tracking)
_context.FireCardInteractionComplete();
}
private void OnDisable()
{
// Hide badges when leaving state
if (newCardIdleBadge != null)
newCardIdleBadge.SetActive(false);
if (repeatCardIdleBadge != null)
repeatCardIdleBadge.SetActive(false);
}
}
}

View File

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

View File

@@ -0,0 +1,385 @@
using System.Collections.Generic;
using AppleHills.Data.CardSystem;
using Core;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UI.CardSystem.StateMachine;
using UI.CardSystem.StateMachine.States;
namespace UI.CardSystem.Testing
{
/// <summary>
/// Test controller for card state machine testing.
/// Provides UI controls to manually test state transitions, animations, and flows.
/// </summary>
public class CardTestController : MonoBehaviour
{
[Header("Test Card")]
[SerializeField] private Card testCard;
[SerializeField] private CardData testCardData;
[Header("Album Slots for Drag Testing")]
[SerializeField] private AlbumCardSlot slot1;
[SerializeField] private AlbumCardSlot slot2;
[Header("UI References")]
[SerializeField] private TextMeshProUGUI eventLogText;
[SerializeField] private Toggle isNewToggle;
[SerializeField] private Slider repeatCountSlider;
[SerializeField] private TextMeshProUGUI repeatCountLabel;
[SerializeField] private TMP_Dropdown rarityDropdown;
[SerializeField] private Toggle isClickableToggle;
[SerializeField] private TextMeshProUGUI currentStateText;
private List<string> _eventLog = new List<string>();
private CardContext _cardContext;
private Vector3 _originalCardPosition;
private void Awake()
{
if (testCard != null)
{
_cardContext = testCard.GetComponent<CardContext>();
_originalCardPosition = testCard.transform.position;
// Subscribe to all card events
if (_cardContext != null)
{
_cardContext.OnFlipComplete += OnCardFlipComplete;
_cardContext.OnCardDismissed += OnCardDismissed;
_cardContext.OnCardInteractionComplete += OnCardInteractionComplete;
_cardContext.OnUpgradeTriggered += OnCardUpgradeTriggered;
}
}
// Setup UI listeners
if (repeatCountSlider != null)
{
repeatCountSlider.onValueChanged.AddListener(OnRepeatCountChanged);
}
if (isClickableToggle != null)
{
isClickableToggle.onValueChanged.AddListener(OnIsClickableToggled);
}
}
private void Start()
{
// Initialize card with test data
if (testCard != null && testCardData != null && _cardContext != null)
{
_cardContext.SetupCard(testCardData, isNew: true, repeatCount: 0);
}
LogEvent("Card Test Scene Initialized");
UpdateCurrentStateDisplay();
}
private void Update()
{
// Update current state display every frame
if (Time.frameCount % 30 == 0) // Every 0.5 seconds at 60fps
{
UpdateCurrentStateDisplay();
}
}
#region State Transition Buttons
public void TransitionToIdleState()
{
_cardContext?.StateMachine.ChangeState("IdleState");
LogEvent("Transitioned to IdleState");
}
public void TransitionToRevealedState()
{
_cardContext?.StateMachine.ChangeState("RevealedState");
LogEvent("Transitioned to RevealedState");
}
public void TransitionToEnlargedNewState()
{
_cardContext?.StateMachine.ChangeState("EnlargedNewState");
LogEvent("Transitioned to EnlargedNewState");
}
public void TransitionToEnlargedRepeatState()
{
_cardContext?.StateMachine.ChangeState("EnlargedRepeatState");
LogEvent("Transitioned to EnlargedRepeatState");
}
public void TransitionToDraggingState()
{
_cardContext?.StateMachine.ChangeState("DraggingState");
LogEvent("Transitioned to DraggingState");
}
public void TransitionToPlacedInSlotState()
{
_cardContext?.StateMachine.ChangeState("PlacedInSlotState");
LogEvent("Transitioned to PlacedInSlotState");
}
public void TransitionToAlbumEnlargedState()
{
_cardContext?.StateMachine.ChangeState("AlbumEnlargedState");
LogEvent("Transitioned to AlbumEnlargedState");
}
#endregion
#region Simulation Buttons
public void SimulateNewCardFlow()
{
if (_cardContext == null) return;
_cardContext.IsNewCard = true;
_cardContext.RepeatCardCount = 0;
_cardContext.IsClickable = true;
TransitionToIdleState();
LogEvent("Simulating NEW CARD flow - click card to flip");
}
public void SimulateRepeatCardFlow()
{
if (_cardContext == null) return;
int repeatCount = Mathf.RoundToInt(repeatCountSlider.value);
_cardContext.IsNewCard = false;
_cardContext.RepeatCardCount = repeatCount;
_cardContext.IsClickable = true;
TransitionToIdleState();
LogEvent($"Simulating REPEAT CARD flow ({repeatCount}/5) - click card to flip");
}
public void SimulateUpgradeFlow()
{
if (_cardContext == null) return;
_cardContext.IsNewCard = false;
_cardContext.RepeatCardCount = 5; // Trigger upgrade
_cardContext.IsClickable = true;
TransitionToIdleState();
LogEvent("Simulating UPGRADE flow (5/5) - click card to flip and auto-upgrade");
}
public void SimulateAlbumPlacementFlow()
{
if (_cardContext == null) return;
_cardContext.IsNewCard = false;
_cardContext.RepeatCardCount = 0;
TransitionToRevealedState();
LogEvent("Simulating ALBUM PLACEMENT - drag card to slot");
}
#endregion
#region Card Setup Controls
public void ApplyCardSetup()
{
if (_cardContext == null) return;
bool isNew = isNewToggle != null && isNewToggle.isOn;
int repeatCount = repeatCountSlider != null ? Mathf.RoundToInt(repeatCountSlider.value) : 0;
_cardContext.IsNewCard = isNew;
_cardContext.RepeatCardCount = repeatCount;
// Apply rarity if needed
if (rarityDropdown != null && testCardData != null)
{
testCardData.Rarity = (CardRarity)rarityDropdown.value;
}
LogEvent($"Card setup applied: IsNew={isNew}, RepeatCount={repeatCount}");
}
private void OnRepeatCountChanged(float value)
{
if (repeatCountLabel != null)
{
repeatCountLabel.text = $"{Mathf.RoundToInt(value)}/5";
}
}
private void OnIsClickableToggled(bool isClickable)
{
if (_cardContext != null)
{
_cardContext.IsClickable = isClickable;
LogEvent($"Card clickable: {isClickable}");
}
}
#endregion
#region Animation Test Buttons
public void PlayFlipAnimation()
{
// Transition to IdleState and programmatically trigger flip
TransitionToIdleState();
// Get IdleState and trigger click
var idleState = testCard.GetComponentInChildren<CardIdleState>();
if (idleState != null)
{
idleState.OnPointerClick(null);
LogEvent("Playing flip animation");
}
}
public void PlayEnlargeAnimation()
{
if (_cardContext?.Animator != null)
{
_cardContext.Animator.PlayEnlarge(2.5f);
LogEvent("Playing enlarge animation");
}
}
public void PlayShrinkAnimation()
{
if (_cardContext?.Animator != null)
{
_cardContext.Animator.PlayShrink(Vector3.one, null);
LogEvent("Playing shrink animation");
}
}
public void StartIdleHoverAnimation()
{
if (_cardContext?.Animator != null)
{
_cardContext.Animator.StartIdleHover(10f, 1.5f);
LogEvent("Started idle hover animation");
}
}
public void StopIdleHoverAnimation()
{
// Stopping hover is handled by IdleState's OnDisable
LogEvent("Idle hover stopped (change state to stop)");
}
#endregion
#region Utility Buttons
public void ResetCardPosition()
{
if (testCard != null)
{
testCard.transform.position = _originalCardPosition;
testCard.transform.localScale = Vector3.one;
LogEvent("Card position reset");
}
}
public void ClearEventLog()
{
_eventLog.Clear();
UpdateEventLog();
LogEvent("Event log cleared");
}
#endregion
#region Event Handlers
private void OnCardFlipComplete(CardContext context)
{
LogEvent($"Event: OnFlipComplete - IsNew={context.IsNewCard}, RepeatCount={context.RepeatCardCount}");
}
private void OnCardDismissed(CardContext context)
{
LogEvent("Event: OnCardDismissed");
}
private void OnCardInteractionComplete(CardContext context)
{
LogEvent("Event: OnCardInteractionComplete");
}
private void OnCardUpgradeTriggered(CardContext context)
{
LogEvent($"Event: OnUpgradeTriggered - New Rarity={context.CardData?.Rarity}");
}
#endregion
#region Event Log
private void LogEvent(string message)
{
string timestamp = $"[{Time.time:F2}s]";
_eventLog.Add($"{timestamp} {message}");
// Keep only last 20 events
if (_eventLog.Count > 20)
{
_eventLog.RemoveAt(0);
}
UpdateEventLog();
Logging.Debug($"[CardTest] {message}");
}
private void UpdateEventLog()
{
if (eventLogText != null)
{
eventLogText.text = string.Join("\n", _eventLog);
}
}
private void UpdateCurrentStateDisplay()
{
if (currentStateText != null && _cardContext != null && _cardContext.StateMachine != null)
{
// Get the active state by checking which child state GameObject is active
string stateName = "Unknown";
Transform stateMachineTransform = _cardContext.StateMachine.transform;
for (int i = 0; i < stateMachineTransform.childCount; i++)
{
Transform child = stateMachineTransform.GetChild(i);
if (child.gameObject.activeSelf)
{
stateName = child.name;
break;
}
}
currentStateText.text = $"Current State: {stateName}";
}
}
#endregion
private void OnDestroy()
{
// Unsubscribe from events
if (_cardContext != null)
{
_cardContext.OnFlipComplete -= OnCardFlipComplete;
_cardContext.OnCardDismissed -= OnCardDismissed;
_cardContext.OnCardInteractionComplete -= OnCardInteractionComplete;
_cardContext.OnUpgradeTriggered -= OnCardUpgradeTriggered;
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1d6de9a5b64e791409043fb8c858bda2

View File

@@ -92,27 +92,35 @@ For each state, follow this pattern:
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `IdleState`
3. Add Component → **Card Idle State**
4. **No child visuals needed** for this state
#### 2. FlippingState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `FlippingState`
3. Add Component → **Card Flipping State**
4. **Create CardBackVisual child:**
- Right-click `FlippingState`**UI → Image**
- Right-click `IdleState`**UI → Image**
- Name it `CardBackVisual`
- Set **Anchors** to stretch-stretch
- Set **Left/Right/Top/Bottom** to `0`
- Assign your card back sprite to **Source Image**
- Drag this to **Card Back Visual** field on CardFlippingState component
- Drag this to **Card Back Visual** field on CardIdleState component
- **Note:** This state handles both idle behavior AND flip animation
#### 3. RevealedState
#### 2. RevealedState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `RevealedState`
3. Add Component → **Card Revealed State**
4. **No child visuals needed** for this state
4. **Create idle badge visuals:**
- Right-click `RevealedState`**Create Empty**
- Name it `NewCardIdleBadge`
- Add child **UI → Image** for small badge background
- Add child **UI → TextMeshProUGUI** for "NEW!" text
- Position at top-right corner (e.g., X offset +70, Y offset +100)
- Drag `NewCardIdleBadge` to **New Card Idle Badge** field
#### 4. EnlargedNewState
- Right-click `RevealedState`**Create Empty**
- Name it `RepeatCardIdleBadge`
- Add child **UI → Image** for small badge background
- Add child **UI → TextMeshProUGUI** for "REPEAT" text
- Position at top-right corner (same position as NEW badge)
- Drag `RepeatCardIdleBadge` to **Repeat Card Idle Badge** field
#### 3. EnlargedNewState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `EnlargedNewState`
3. Add Component → **Card Enlarged New State**
@@ -124,36 +132,34 @@ For each state, follow this pattern:
- Position badge at top of card (e.g., Y offset +100)
- Drag parent `NewCardBadge` to **New Card Badge** field on CardEnlargedNewState
#### 5. EnlargedRepeatState
#### 4. EnlargedRepeatState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `EnlargedRepeatState`
3. Add Component → **Card Enlarged Repeat State**
4. **Create ProgressBarUI child:**
- Right-click `EnlargedRepeatState`**Create Empty**
- Name it `ProgressBarContainer`
- Add child **UI → Image** for background bar
- Add child **UI → Image** for fill bar (set Image Type to **Filled**)
- Add child **UI → TextMeshProUGUI** for "X/5" text
- Right-click `EnlargedRepeatState`**Create Empty** (or drag your ProgressBarUI prefab)
- Name it `ProgressBarUI`
- Add **ProgressBarController** component to this GameObject
- Add **VerticalLayoutGroup** component (enable "Reverse Arrangement")
- Create 5 child **UI → Image** elements under ProgressBarUI
- Name them `ProgressElement1` through `ProgressElement5`
- Position at bottom of card (e.g., Y offset -100)
- Drag `ProgressBarContainer` to **Progress Bar Container** field
- Drag fill bar to **Progress Bar Fill** field
- Drag text to **Progress Text** field
- Set **Cards To Upgrade** to `5`
- Drag `ProgressBarController` component to **Progress Bar** field on CardEnlargedRepeatState
#### 6. DraggingState
#### 5. DraggingState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `DraggingState`
3. Add Component → **Card Dragging State**
4. Set **Drag Scale** to `1.1`
5. **No child visuals needed** for this state
#### 7. PlacedInSlotState
#### 6. PlacedInSlotState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `PlacedInSlotState`
3. Add Component → **Card Placed In Slot State**
4. **No child visuals needed** for this state
#### 8. AlbumEnlargedState
#### 7. AlbumEnlargedState
1. Right-click `CardStateMachine`**Create Empty**
2. Name it `AlbumEnlargedState`
3. Add Component → **Card Album Enlarged State**
@@ -293,23 +299,31 @@ Card (RectTransform)
└─ CardStateMachine
├─ [AppleMachine component]
├─ IdleState
─ [CardIdleState component]
├─ FlippingState
│ ├─ [CardFlippingState component]
─ [CardIdleState component]
│ └─ CardBackVisual (Image)
├─ RevealedState
─ [CardRevealedState component]
─ [CardRevealedState component]
│ ├─ NewCardIdleBadge
│ │ ├─ BadgeBackground (Image)
│ │ └─ BadgeText (TextMeshProUGUI - "NEW!")
│ └─ RepeatCardIdleBadge
│ ├─ BadgeBackground (Image)
│ └─ BadgeText (TextMeshProUGUI - "REPEAT")
├─ EnlargedNewState
│ ├─ [CardEnlargedNewState component]
│ └─ NewCardBadge
│ ├─ BadgeBackground (Image)
│ └─ BadgeText (TextMeshProUGUI)
│ └─ BadgeText (TextMeshProUGUI - "NEW CARD")
├─ EnlargedRepeatState
│ ├─ [CardEnlargedRepeatState component]
│ └─ ProgressBarContainer
│ ├─ BarBackground (Image)
│ ├─ BarFill (Image - Filled type)
CountText (TextMeshProUGUI)
│ └─ ProgressBarUI
│ ├─ [ProgressBarController component]
│ ├─ [VerticalLayoutGroup component - Reverse Arrangement]
ProgressElement1 (Image - 1/5)
│ ├─ ProgressElement2 (Image - 2/5)
│ ├─ ProgressElement3 (Image - 3/5)
│ ├─ ProgressElement4 (Image - 4/5)
│ └─ ProgressElement5 (Image - 5/5)
├─ DraggingState
│ └─ [CardDraggingState component]
├─ PlacedInSlotState
@@ -354,7 +368,7 @@ Card (RectTransform)
- [ ] Created CardAnimationConfig asset
- [ ] Created base Card prefab with all components
- [ ] Created all 8 state GameObjects under CardStateMachine
- [ ] Created all 7 state GameObjects under CardStateMachine
- [ ] Assigned state-owned visuals (CardBackVisual, NewCardBadge, ProgressBarUI)
- [ ] Wired up all component references
- [ ] Tested state transitions in Play mode
@@ -397,8 +411,8 @@ Card (RectTransform)
## Success Criteria
✅ Card prefab created with 8 functional states
✅ State transitions work (Idle → Flipping → Revealed, etc.)
✅ Card prefab created with 7 functional states
✅ State transitions work (Idle → Revealed → Enlarged, etc.)
✅ State-owned visuals activate/deactivate automatically
✅ Animations play correctly (flip, enlarge, hover)
✅ Click interactions work in all states

View File

@@ -1,4 +1,4 @@
# Card State Machine Implementation Summary
# Card State Machine Implementation Summary
## Architecture Overview
@@ -6,17 +6,93 @@
```
Card (RectTransform - primary animation target)
├─ CardDisplay (always visible)
├─ CardContext (shared references)
├─ CardDisplay (always visible - shows card front)
├─ CardContext (shared references + events)
├─ CardAnimator (reusable animations)
└─ CardStateMachine (AppleMachine)
├─ IdleState/
│ └─ CardBackVisual ← State owns this
├─ FlippingState/
│ └─ CardBackVisual ← State owns this
├─ RevealedState/
│ ├─ NewCardIdleBadge ← State owns this
│ └─ RepeatCardIdleBadge ← State owns this
├─ EnlargedNewState/
│ └─ NewCardBadge ← State owns this
─ EnlargedRepeatState/
ProgressBarUI ← State owns this
─ EnlargedRepeatState/
RepeatText ← State owns this
│ └─ ProgressBarContainer/
│ └─ ProgressBarUI (prefab with ProgressBarController)
├─ DraggingState/ (no child visuals)
├─ PlacedInSlotState/ (no child visuals)
└─ AlbumEnlargedState/ (no child visuals)
```
## State Flow Diagrams
### **Booster Opening Flow:**
↓ [player clicks]
2. FlippingState (flip animation + scale punch)
1. IdleState (card back in assigned slot, hover enabled)
↓ [player clicks - flip animation plays within IdleState]
3a. IF NEW CARD:
↓ [determine path based on card status]
2a. IF NEW CARD:
3b. IF LEGENDARY REPEAT:
→ [tap] → Fires OnCardDismissed
→ Shrink → RevealedState
3c. IF REPEAT (won't upgrade, e.g., 2/5):
2b. IF LEGENDARY REPEAT:
→ Skip enlarge → RevealedState (can't upgrade)
2c. IF REPEAT (won't upgrade, e.g., 2/5):
→ EnlargedRepeatState
3d. IF REPEAT (WILL upgrade, e.g., 5/5):
→ [tap] → Fires OnCardDismissed
→ Shrink → RevealedState
2d. IF REPEAT (WILL upgrade, e.g., 5/5):
→ EnlargedRepeatState
→ Show progress bar (5/5) + blink
→ AUTO-UPGRADE (no tap needed)
→ Fires OnUpgradeTriggered
→ Update inventory
→ Check if new/repeat at higher rarity:
IF NEW at higher: → EnlargedNewState (higher rarity)
4. RevealedState (normal size, waiting)
→ [tap] → Fires OnCardDismissed
→ Shrink → RevealedState
5. [When all cards complete]
→ Fires OnCardInteractionComplete
→ Waits for all 3 cards to finish
4. [When all cards complete]
→ BoosterOpeningPage animates cards to album → Destroy
```
### **Album Placement Flow:**
```
1. IdleState (card back in corner, hover enabled)
↓ [player clicks]
2. FlippingState (reveals which card it is)
→ OnFlipComplete
3. RevealedState
→ OnCardInteractionComplete
↓ [player drags]
4. DraggingState (scaled up during drag)
↓ [drop in slot]
5. PlacedInSlotState (in album permanently)
↓ [player clicks]
6. AlbumEnlargedState
→ Fires OnEnlargeRequested (page shows backdrop, reparents)
↓ [player taps]
→ Fires OnShrinkRequested (page prepares)
→ Shrink animation
5. PlacedInSlotState (back in slot)
```
## Key Design Decisions
@@ -32,81 +108,301 @@ Card (RectTransform - primary animation target)
- **State child visuals** can be animated independently (e.g., rotating CardBackVisual during flip)
- States decide WHAT to animate, CardAnimator provides HOW
### 3. Shared Resources
- `CardContext` component provides states access to:
- CardDisplay
- CardAnimator
- StateMachine
- CardData
- IsNewCard flag
- States call `_context.Animator.PlayFlip(...)` instead of duplicating tween code
### 3. Shared Resources via CardContext
```csharp
public class CardContext : MonoBehaviour
{
// Component references
public CardDisplay CardDisplay { get; }
public CardAnimator Animator { get; }
public AppleMachine StateMachine { get; }
public Transform RootTransform { get; }
// Card data
public CardData CardData { get; }
public bool IsNewCard { get; set; }
public int RepeatCardCount { get; set; }
public bool IsClickable { get; set; } // Prevents multi-flip in booster opening
// Events for external coordination (BoosterOpeningPage)
public event Action<CardContext> OnFlipComplete;
public event Action<CardContext> OnCardDismissed;
public event Action<CardContext> OnCardInteractionComplete;
public event Action<CardContext> OnUpgradeTriggered;
// Helper methods
public void FireFlipComplete();
public void FireCardDismissed();
public void FireCardInteractionComplete();
public void FireUpgradeTriggered();
}
```
### 4. State Transitions
States explicitly transition via `_context.StateMachine.ChangeState("StateName")`
Example flow:
Example:
```csharp
// In CardFlippingState.OnFlipComplete():
if (_context.IsNewCard)
_context.StateMachine.ChangeState("EnlargedNewState");
else if (_context.RepeatCardCount > 0)
_context.StateMachine.ChangeState("EnlargedRepeatState");
```
IdleState
[click] → FlippingState
[flip complete + IsNew] → EnlargedNewState
[tap] → RevealedState
### 5. Progress Bar Architecture
**ProgressBarController Component:**
- Auto-detects child Image elements (5 images in GridLayout)
- Fills from bottom to top (element[0] = bottom)
- Blinks newest element with configurable timing
- Callback when animation completes
**Usage:**
```csharp
progressBar.ShowProgress(currentCount, maxCount, OnProgressComplete);
```
## Files Created
**Core Components:**
- `CardContext.cs` - Shared context accessible to all states
- `CardAnimator.cs` - Reusable animation methods
- `CardAnimationConfig.cs` - ScriptableObject for designer tweaks
### **Core Components:**
- `StateMachine/CardContext.cs` - Shared context + events
- `StateMachine/CardAnimator.cs` - Reusable animation methods (enlarge, shrink, flip, idle hover, etc.)
- `ProgressBarController.cs` - Progress bar UI controller with blink animation
**State Implementations:**
- `States/CardIdleState.cs` - Hover animation, click to flip
- `States/CardFlippingState.cs` - Owns CardBackVisual, flip animation
- `States/CardRevealedState.cs` - Waiting for interaction
- `States/CardEnlargedNewState.cs` - Owns NewCardBadge, tap to dismiss
- `States/CardEnlargedRepeatState.cs` - Owns ProgressBarUI, tap to dismiss
### **Settings:**
- `Core/Settings/CardSystemSettings.cs` - ScriptableObject for all card animation timings
- `Core/Settings/ICardSystemSettings.cs` - Interface for settings access
## Next Steps
### **State Implementations:**
- `States/CardIdleState.cs` - Owns CardBackVisual, idle hover, click to flip (with click blocking)
- `States/CardFlippingState.cs` - Owns CardBackVisual, flip animation, Legendary shortcut
- `States/CardRevealedState.cs` - Owns NewCardIdleBadge + RepeatCardIdleBadge, fires OnCardInteractionComplete
- `States/CardEnlargedNewState.cs` - Owns NewCardBadge, tap to shrink
- `States/CardEnlargedRepeatState.cs` - Owns RepeatText + ProgressBarUI, auto-upgrade logic
- `States/CardDraggingState.cs` - Drag handling for album placement
- `States/CardPlacedInSlotState.cs` - In album slot, click to enlarge
- `States/CardAlbumEnlargedState.cs` - Enlarged from album, tap to shrink
1. **Create remaining states:**
- `CardDraggingState` (for album placement flow)
- `CardPlacedInSlotState` (album slot interaction)
- `CardAlbumEnlargedState` (enlarge from album)
## Prefab Assembly Instructions
2. **Build Card prefab:**
- Setup hierarchy with state children
- Assign CardBackVisual, NewCardBadge, ProgressBarUI to states
- Create CardAnimationConfig asset
### **Card Prefab Hierarchy:**
```
Card (RectTransform)
├─ CardDisplay (existing prefab)
├─ CardContext (component)
├─ FlippingState (CardFlippingState component)
│ └─ CardBackVisual (Image)
├─ CardAnimator (component)
└─ CardStateMachine (AppleMachine)
├─ IdleState (CardIdleState component)
│ └─ CardBackVisual (Image)
├─ RevealedState (CardRevealedState component)
│ ├─ NewCardIdleBadge (Image/Text - "NEW!")
│ └─ RepeatCardIdleBadge (Image/Text - "REPEAT")
│ └─ ProgressBarContainer (GameObject)
│ └─ ProgressBarUI (prefab instance)
│ └─ NewCardBadge (Image/Text - "NEW CARD")
├─ EnlargedRepeatState (CardEnlargedRepeatState component)
│ ├─ RepeatText (Image/Text - "REPEAT CARD")
│ └─ ProgressBarUI (ProgressBarController component + 5 Image children)
├─ DraggingState (CardDraggingState component)
ProgressBarUI
├─ GridLayoutGroup (1 column, 5 rows, "Lower Right" corner start)
├─ ProgressElement1 (Image)
3. **Migrate existing code:**
- Update BoosterOpeningPage to use new Card
- Update AlbumViewPage to use new Card
- Remove old wrapper scripts (FlippableCard, AlbumCard, etc.)
### **ProgressBarUI Prefab:**
```
ProgressBarUI (GameObject with ProgressBarController component)
└─ ProgressElement5 (Image)
├─ VerticalLayoutGroup (Reverse Arrangement enabled)
└─ Children (5 Images, auto-detected):
├─ ProgressElement1 (Image) - First child = 1/5
├─ ProgressElement2 (Image)
├─ ProgressElement3 (Image)
├─ ProgressElement4 (Image)
└─ ProgressElement5 (Image) - Last child = 5/5
```
### **Component References to Assign:**
**CardContext:**
- cardDisplay → CardDisplay component
- cardAnimator → CardAnimator component
**CardIdleState:**
- cardBackVisual → CardBackVisual child GameObject
**CardFlippingState:**
- cardBackVisual → CardBackVisual child GameObject
**CardRevealedState:**
- progressBarContainer → ProgressBarContainer child GameObject
- progressBar → ProgressBarController component (on ProgressBarUI prefab)
- repeatCardIdleBadge → RepeatCardIdleBadge child GameObject
**CardEnlargedNewState:**
- newCardBadge → NewCardBadge child GameObject
**CardEnlargedRepeatState:**
- progressBar → ProgressBarController component (on ProgressBarUI child GameObject)
- repeatText → RepeatText child GameObject
## Integration with BoosterOpeningPage
```csharp
// When spawning cards:
Card card = Instantiate(cardPrefab);
CardContext context = card.GetComponent<CardContext>();
// Setup card data
context.SetupCard(cardData, isNew: isNewCard, repeatCount: ownedCount);
// All cards start clickable
context.IsClickable = true;
// Subscribe to events
context.OnFlipComplete += OnCardFlipComplete;
context.OnCardDismissed += OnCardDismissed;
context.OnCardInteractionComplete += OnCardInteractionComplete;
context.OnUpgradeTriggered += OnCardUpgraded;
// Start in IdleState
context.StateMachine.ChangeState("IdleState");
// When a card starts flipping, block all others
private void OnCardFlipComplete(CardContext flippingCard)
{
// Disable all cards to prevent multi-flip
foreach (CardContext card in _allCards)
{
card.IsClickable = false;
}
}
// Track completion
private void OnCardInteractionComplete(CardContext card)
{
_cardsCompletedInteraction++;
if (_cardsCompletedInteraction == 3)
{
AnimateCardsToAlbum(); // All cards revealed, animate to album
}
else
{
// Re-enable unflipped cards
foreach (CardContext c in _allCards)
{
if (c.StateMachine.CurrentState.name == "IdleState")
{
c.IsClickable = true;
}
}
}
}
```
## Benefits vs Old System
| Aspect | Old System | New System |
|--------|-----------|------------|
| Components per card | 5+ wrappers | 1 root + states |
| Animation code duplication | ~150 lines across 4 files | 0 (shared CardAnimator) |
| State tracking | 12+ boolean flags | 1 state machine |
| Visual element management | Manual SetActive calls | Automatic via state activation |
| Adding new behaviors | Modify 3-4 components | Add 1 new state GameObject |
| Prefab nesting | 5 layers deep | Flat (states as children) |
| Debugging state | Check 12 booleans | Look at active state name |
| Components per card | FlippableCard + AlbumCard + wrappers | 1 Card + states |
| Animation code duplication | ~200 lines across 5 files | 0 (shared CardAnimator) |
| State tracking | 12+ boolean flags (_isFlipped, _isFlipping, _isWaitingForTap, etc.) | 1 active state name |
| Visual element management | Manual SetActive() in 8+ places | Automatic via state activation |
| Adding new behaviors | Modify 3-4 components + events | Add 1 new state GameObject |
| Prefab nesting | FlippableCard → AlbumCard → CardDisplay (5 layers) | Card → States (flat hierarchy) |
| Debugging state | Check 12 booleans across files | Look at active state name in inspector |
| Progress bar logic | 50 lines in FlippableCard.ShowProgressBar() | Isolated in ProgressBarController |
| Upgrade logic | TriggerUpgradeTransition (80 lines in FlippableCard) | TriggerUpgrade (isolated in CardEnlargedRepeatState) |
| Event coordination | 4 events on FlippableCard, 2 on AlbumCard | 4 events on CardContext (centralized) |
## Example: Adding New State
## Testing Checklist
Want to add a "Trading" state where card shows trade UI?
- [ ] Booster opening: NEW card shows badge → tap → shrinks → shows NEW idle badge
- [ ] Booster opening: REPEAT card (2/5) shows REPEAT text + progress → blink → tap → shrinks → shows REPEAT idle badge
- [ ] Booster opening: REPEAT card (5/5) auto-upgrades → shows NEW at higher rarity
- [ ] Booster opening: Legendary repeat skips enlarge
- [ ] Booster opening: Click blocking prevents multi-flip
- [ ] Booster opening: All 3 cards complete → animate to album
- [ ] Album placement: Card in corner → click → reveals → drag → place in slot
- [ ] Album placement: Card in slot → click → enlarges → tap → shrinks back
- [ ] Cascading upgrades (Common → Uncommon → Rare in one reveal)
- [ ] Progress bar shows correctly (1/5, 2/5, 3/5, 4/5, 5/5)
- [ ] Progress bar blinks newest element
- [ ] Idle hover animation works in both flows
- [ ] Hover scale works on pointer enter/exit
**Old system:** Modify FlippableCard, AlbumCard, add new wrapper, update events, etc.
## Integration Work Remaining
1. Update BoosterOpeningPage to use new Card prefab instead of FlippableCard
2. Update AlbumViewPage to use new Card prefab instead of AlbumCard
3. Migrate album placement drag/drop to use DraggingState
4. Remove old FlippableCard.cs and AlbumCard.cs after migration
5. **(Optional)** Add Jiggle() animation to CardAnimator for clicking inactive cards
## Migration Path
**Phase 1: Side-by-side (Current)**
- New state machine exists alongside old FlippableCard/AlbumCard
- Can test new system without breaking existing functionality
**Phase 2: Booster Opening Migration**
- Update BoosterOpeningPage to spawn new Card prefab
- Remove FlippableCard references
- Test all booster flows
**Phase 3: Album Migration**
- Update AlbumViewPage to spawn new Card prefab
- Remove AlbumCard references
- Test album placement and enlarge
**Phase 4: Cleanup**
- Delete FlippableCard.cs
- Delete AlbumCard.cs
- Delete old wrapper components
- Clean up unused prefab variants
## Example: Adding New Card Behavior
**Scenario:** Add a "Trading" state where card shows trade UI?
**Old system:**
1. Modify FlippableCard.cs (add boolean, methods, events)
2. Modify AlbumCard.cs (add pass-through logic)
3. Update 3-4 wrapper components
4. Add new events and subscriptions
5. Manually manage trade UI visibility
**New system:**
1. Create `CardTradingState.cs`
2. Add `TradingState` GameObject under CardStateMachine
1. Create `CardTradingState.cs`:
```csharp
public class CardTradingState : AppleState
{
[SerializeField] private GameObject tradeUI;
public override void OnEnterState()
{
// tradeUI automatically activates with state!
}
}
```
2. Add TradingState GameObject under CardStateMachine
3. Add trade UI as child of TradingState
4. Implement `OnEnterState()` to show UI
5. Call `ChangeState("TradingState")` from wherever needed
4. Call `ChangeState("TradingState")` from wherever needed
**Done! Zero other files modified.**
---
## Summary
The new state machine implementation successfully replicates all core FlippableCard/AlbumCard functionality with:
- ✅ Cleaner architecture (state pattern vs boolean soup)
- ✅ Less code duplication (shared CardAnimator)
- ✅ Easier debugging (visible state names)
- ✅ Simpler extension (add states vs modify monoliths)
- ✅ Better separation of concerns (each state owns its visuals)
**Status: Core implementation complete, ready for prefab assembly and integration testing.**
Done! No other files touched.

View File

@@ -0,0 +1,285 @@
# Card Test Scene - Quick Reference
## What Was Created
### 📁 Scripts
- **CardTestController.cs** - Main testing controller with UI event handlers
- Location: `Assets/Scripts/UI/CardSystem/Testing/CardTestController.cs`
### 📄 Documentation
- **card_test_scene_setup_guide.md** - Complete scene setup instructions (17 steps)
- Location: `docs/cards_wip/card_test_scene_setup_guide.md`
---
## Quick Start Guide
### Step-by-Step Setup (Condensed)
1. **Create Scene**
- New scene → Save as `CardSystemTestScene.unity`
2. **Create Canvas**
- UI → Canvas (Screen Space, 1920x1080 reference)
3. **Left Side - Card Test Area (70% width)**
```
CardTestArea (container)
├─ CardSpawnPoint → [Instantiate Card prefab here]
├─ AlbumSlot1 (bottom-left, 150,150)
└─ AlbumSlot2 (bottom-right, -150,150)
```
4. **Right Side - Control Panel (30% width)**
```
TestControlPanel (dark gray panel)
├─ CurrentStateText (yellow)
├─ State Transition Buttons (7)
├─ Simulation Buttons (4)
├─ Card Setup Controls (toggle, slider, dropdown)
├─ Clickability Toggle
├─ Animation Test Buttons (4)
├─ Event Log (scroll view)
└─ Utility Buttons (2)
```
5. **Add Controller**
- Empty GameObject → CardTestController component
- Assign all 11 references from hierarchy
6. **Wire Up Buttons**
- Connect all button OnClick() events to CardTestController methods
---
## Testing Workflows
### Test Flow 1: NEW Card
1. Click "Simulate NEW Card"
2. Click card → flips → shows NEW badge
3. Tap enlarged card → shrinks to RevealedState
4. Check event log for OnFlipComplete, OnCardDismissed, OnCardInteractionComplete
### Test Flow 2: REPEAT Card
1. Set Repeat Count slider to 3
2. Click "Simulate REPEAT Card"
3. Click card → flips → shows progress bar (3/5) → blinks
4. Tap → shrinks to RevealedState
5. Verify REPEAT badge shows in RevealedState
### Test Flow 3: UPGRADE
1. Click "Simulate UPGRADE (5/5)"
2. Click card → flips → progress (5/5) → auto-upgrades
3. Shows NEW badge at higher rarity
4. Check event log for OnUpgradeTriggered
### Test Flow 4: Album Placement
1. Click "Simulate Album Placement"
2. Drag card to AlbumSlot1 or AlbumSlot2
3. Card enters DraggingState (scales up)
4. Drop → PlacedInSlotState
5. Click card → AlbumEnlargedState
6. Tap → back to PlacedInSlotState
### Test Flow 5: Manual State Jumping
1. Click any state button (e.g., "Enlarged New")
2. Verify visuals appear correctly
3. Check Current State display updates
4. Try rapid state changes
---
## Key Features
### State Transition Buttons
- **7 buttons** for direct state access
- Instantly jump to any state (bypasses normal flow)
- Useful for testing edge cases
### Simulation Buttons
- **Simulate NEW Card** - Full new card reveal flow
- **Simulate REPEAT Card** - Progress bar display flow
- **Simulate UPGRADE (5/5)** - Auto-upgrade flow
- **Simulate Album Placement** - Drag/drop to album flow
### Card Setup Controls
- **Is New Toggle** - Mark card as new/repeat
- **Repeat Count Slider** - Set owned count (0-5)
- **Rarity Dropdown** - Change card rarity
- **Apply Button** - Apply all settings to card
### Animation Tests
- **Play Flip** - Trigger flip animation manually
- **Play Enlarge** - Enlarge card without state change
- **Play Shrink** - Shrink card to normal size
- **Start Idle Hover** - Begin hover animation
### Event Log
- **Real-time event tracking** - See all CardContext events
- **Timestamped** - Know when events fired
- **Last 20 events** - Auto-truncates
- **Clear button** - Reset log
### Utility Controls
- **Is Clickable Toggle** - Test click blocking
- **Reset Position** - Return card to center
- **Clear Log** - Reset event log
---
## CardTestController API Reference
### Public Methods (Called by UI Buttons)
#### State Transitions
```csharp
void TransitionToIdleState()
void TransitionToRevealedState()
void TransitionToEnlargedNewState()
void TransitionToEnlargedRepeatState()
void TransitionToDraggingState()
void TransitionToPlacedInSlotState()
void TransitionToAlbumEnlargedState()
```
#### Simulations
```csharp
void SimulateNewCardFlow() // NEW card: Idle → Flip → EnlargedNew → RevealedState
void SimulateRepeatCardFlow() // REPEAT: Idle → Flip → EnlargedRepeat → RevealedState
void SimulateUpgradeFlow() // UPGRADE: Idle → Flip → EnlargedRepeat → Auto-upgrade → EnlargedNew
void SimulateAlbumPlacementFlow() // Album: RevealedState → ready to drag
```
#### Card Setup
```csharp
void ApplyCardSetup() // Apply toggle/slider/dropdown values to card
```
#### Animations
```csharp
void PlayFlipAnimation() // Manually trigger flip
void PlayEnlargeAnimation() // Enlarge without state change
void PlayShrinkAnimation() // Shrink to normal size
void StartIdleHoverAnimation() // Start hover bobbing
void StopIdleHoverAnimation() // Stop hover (change state to stop)
```
#### Utilities
```csharp
void ResetCardPosition() // Return card to center position
void ClearEventLog() // Clear event log display
```
---
## Inspector Setup Checklist
When you add CardTestController component, assign these references:
### Card References
- ✅ **Test Card** → TestCard (from hierarchy)
- ✅ **Test Card Data** → CardData ScriptableObject asset
### Slot References
- ✅ **Slot 1** → AlbumSlot1 (from hierarchy)
- ✅ **Slot 2** → AlbumSlot2 (from hierarchy)
### UI References (11 total)
- ✅ **Event Log Text** → EventLogText (in scroll view)
- ✅ **Is New Toggle** → Toggle_IsNew
- ✅ **Repeat Count Slider** → Slider_RepeatCount
- ✅ **Repeat Count Label** → Label_RepeatCount
- ✅ **Rarity Dropdown** → Dropdown_Rarity
- ✅ **Is Clickable Toggle** → Toggle_IsClickable
- ✅ **Current State Text** → CurrentStateText
---
## Expected Event Sequence
### NEW Card Flow
```
[0.00s] Card Test Scene Initialized
[0.50s] Simulating NEW CARD flow - click card to flip
[1.20s] Event: OnFlipComplete - IsNew=True, RepeatCount=0
[1.20s] Transitioned to EnlargedNewState
[3.40s] Event: OnCardDismissed
[3.40s] Transitioned to RevealedState
[3.40s] Event: OnCardInteractionComplete
```
### REPEAT Card Flow (3/5)
```
[0.00s] Card Test Scene Initialized
[0.50s] Simulating REPEAT CARD flow (3/5) - click card to flip
[1.20s] Event: OnFlipComplete - IsNew=False, RepeatCount=3
[1.20s] Transitioned to EnlargedRepeatState
[2.80s] Progress bar blink complete
[4.10s] Event: OnCardDismissed
[4.10s] Transitioned to RevealedState
[4.10s] Event: OnCardInteractionComplete
```
### UPGRADE Flow (5/5)
```
[0.00s] Card Test Scene Initialized
[0.50s] Simulating UPGRADE flow (5/5) - click card to flip
[1.20s] Event: OnFlipComplete - IsNew=False, RepeatCount=5
[1.20s] Transitioned to EnlargedRepeatState
[2.80s] Event: OnUpgradeTriggered - New Rarity=Uncommon
[2.80s] Transitioned to EnlargedNewState
[4.50s] Event: OnCardDismissed
[4.50s] Transitioned to RevealedState
[4.50s] Event: OnCardInteractionComplete
```
---
## Troubleshooting Quick Fixes
| Issue | Quick Fix |
|-------|-----------|
| Buttons don't work | Check EventSystem exists, verify OnClick() wired up |
| Card not visible | Verify Card prefab instantiated, check CardSpawnPoint |
| Events don't log | Verify EventLogText assigned, check Console for errors |
| State won't change | Check state names match exactly (case-sensitive) |
| Progress bar missing | Verify ProgressBarUI child exists in EnlargedRepeatState |
| Can't drag card | Ensure AlbumCardSlot components exist on slots |
| Current State shows "Unknown" | Normal if no state active, check card is in a state |
---
## Performance Notes
- **Event Log** updates every event (can be 20+ times per flow)
- **Current State Display** updates every 0.5 seconds (not every frame)
- **Layout Groups** may cause GC spikes - normal for test scene
- Target: **60fps** with card animations
---
## Next Steps After Setup
1. ✅ Create scene following guide
2. ✅ Test all 7 state transitions
3. ✅ Test all 4 simulation flows
4. ✅ Verify event log shows all events
5. ✅ Test drag/drop to album slots
6. ✅ Test click blocking toggle
7. ✅ Take screenshots of working states for documentation
8. ✅ Report any bugs found in state machine
9. ✅ Use scene for future card feature development
---
## Files to Reference
- **Full Setup Guide**: `docs/cards_wip/card_test_scene_setup_guide.md`
- **Card Assembly Guide**: `docs/cards_wip/card_prefab_assembly_guide.md`
- **Implementation Summary**: `docs/cards_wip/card_system_implementation_summary.md`
- **Test Controller Script**: `Assets/Scripts/UI/CardSystem/Testing/CardTestController.cs`
---
**Happy Testing! 🎴**

View File

@@ -0,0 +1,589 @@
# Card Test Scene Setup Guide
## Overview
This guide walks you through creating a complete testing scene for the Card state machine system. The scene provides manual controls to test all state transitions, animations, and gameplay flows.
---
## Step 1: Create New Scene
1. In Unity, **File → New Scene**
2. Select **Basic (Built-in)** or **2D** template
3. Save as `Assets/Scenes/CardSystemTestScene.unity`
---
## Step 2: Setup Canvas
### Create Main Canvas
1. Right-click in Hierarchy → **UI → Canvas**
2. Name it `TestCanvas`
3. In Canvas component:
- **Render Mode**: Screen Space - Overlay
- **UI Scale Mode**: Scale With Screen Size
- **Reference Resolution**: 1920 x 1080
- **Match**: 0.5 (balance between width and height)
### Verify EventSystem
- Unity should auto-create **EventSystem** GameObject
- If not, right-click Hierarchy → **UI → Event System**
---
## Step 3: Create CardTestArea (Left Side)
### Create CardTestArea Container
1. Right-click `TestCanvas`**Create Empty**
2. Name it `CardTestArea`
3. Add **RectTransform** component (should auto-add)
4. Configure RectTransform:
- **Anchors**: Left-Stretch (left side, vertical stretch)
- **Pivot**: (0, 0.5)
- **Pos X**: 0
- **Pos Y**: 0
- **Width**: 1344 (70% of 1920)
- **Height**: 0 (auto from anchor stretch)
### Add Background (Optional)
1. Right-click `CardTestArea`**UI → Image**
2. Name it `Background`
3. Set **Color**: Light gray (R:0.9, G:0.9, B:0.9, A:0.3)
4. Set **Anchors**: Stretch-Stretch
### Add Card Spawn Point
1. Right-click `CardTestArea`**Create Empty**
2. Name it `CardSpawnPoint`
3. Configure RectTransform:
- **Anchors**: Center-Middle
- **Pos X**: 0
- **Pos Y**: 100 (slightly above center)
- **Width**: 200
- **Height**: 280
---
## Step 4: Instantiate Test Card
1. **Drag your Card prefab** from Project into `CardSpawnPoint`
2. Name it `TestCard`
3. Ensure it's positioned at (0, 0, 0) local position
4. The card should be centered in the CardTestArea
**Note:** If you haven't created the Card prefab yet, follow the `card_prefab_assembly_guide.md` first.
---
## Step 5: Create Album Slots for Drag Testing
### Create Slot 1 (Bottom-Left)
1. Right-click `CardTestArea`**Create Empty**
2. Name it `AlbumSlot1`
3. Add Component → **Album Card Slot** (your existing script)
4. Configure RectTransform:
- **Anchors**: Bottom-Left
- **Pivot**: (0.5, 0.5)
- **Pos X**: 150
- **Pos Y**: 150
- **Width**: 200
- **Height**: 280
5. Add child **UI → Image** for visual slot background:
- Name it `SlotBackground`
- Set **Color**: White with alpha 0.5
- Set **Anchors**: Stretch-Stretch
- Assign a slot frame sprite if available
### Create Slot 2 (Bottom-Right)
1. Duplicate `AlbumSlot1` (Ctrl+D)
2. Name it `AlbumSlot2`
3. Configure RectTransform:
- **Anchors**: Bottom-Right
- **Pivot**: (0.5, 0.5)
- **Pos X**: -150 (negative for right side)
- **Pos Y**: 150
- **Width**: 200
- **Height**: 280
---
## Step 6: Create Test Control Panel (Right Side)
### Create Panel Container
1. Right-click `TestCanvas`**UI → Panel**
2. Name it `TestControlPanel`
3. Configure RectTransform:
- **Anchors**: Right-Stretch (right side, vertical stretch)
- **Pivot**: (1, 0.5)
- **Pos X**: 0
- **Pos Y**: 0
- **Width**: 576 (30% of 1920)
- **Height**: 0 (auto from anchor stretch)
4. Set **Color**: Dark gray (R:0.2, G:0.2, B:0.2, A:0.95)
### Add Vertical Layout Group
1. Select `TestControlPanel`
2. Add Component → **Vertical Layout Group**
3. Configure:
- **Child Alignment**: Upper Center
- **Control Child Size**: Width ✓, Height ✗
- **Child Force Expand**: Width ✓, Height ✗
- **Padding**: Left=20, Right=20, Top=20, Bottom=20
- **Spacing**: 10
### Add Content Size Fitter
1. Select `TestControlPanel`
2. Add Component → **Content Size Fitter**
3. Configure:
- **Horizontal Fit**: Unconstrained
- **Vertical Fit**: Preferred Size
---
## Step 7: Add Current State Display
1. Right-click `TestControlPanel`**UI → Text - TextMeshPro**
2. Name it `CurrentStateText`
3. Configure:
- **Text**: "Current State: None"
- **Font Size**: 24
- **Alignment**: Center
- **Color**: Yellow
- **Auto Size**: Min=16, Max=28
4. Add **Layout Element** component:
- **Preferred Height**: 40
---
## Step 8: Create State Transition Buttons Section
### Create Section Header
1. Right-click `TestControlPanel`**UI → Text - TextMeshPro**
2. Name it `StateButtonsHeader`
3. Configure:
- **Text**: "State Transitions"
- **Font Size**: 20
- **Font Style**: Bold
- **Color**: White
4. Add **Layout Element**: Preferred Height = 30
### Create Button Container
1. Right-click `TestControlPanel`**Create Empty**
2. Name it `StateButtonsContainer`
3. Add **Vertical Layout Group**:
- **Spacing**: 5
- **Child Force Expand**: Width ✓, Height ✗
4. Add **Layout Element**: Preferred Height = 350
### Add State Transition Buttons (7 buttons)
For each state, create a button:
1. Right-click `StateButtonsContainer`**UI → Button - TextMeshPro**
2. Name it `Button_[StateName]` (e.g., `Button_IdleState`)
3. Configure **Button** component:
- **On Click()**: Drag `CardTestController` GameObject
- Select function: `CardTestController → TransitionTo[StateName]`
4. Configure button **Text (TMP)**:
- Set text to state name (e.g., "Idle State")
- **Font Size**: 16
5. Add **Layout Element**: Preferred Height = 40
**Create these buttons:**
- `Button_IdleState` → "Idle State"
- `Button_RevealedState` → "Revealed State"
- `Button_EnlargedNewState` → "Enlarged New"
- `Button_EnlargedRepeatState` → "Enlarged Repeat"
- `Button_DraggingState` → "Dragging State"
- `Button_PlacedInSlotState` → "Placed In Slot"
- `Button_AlbumEnlargedState` → "Album Enlarged"
---
## Step 9: Create Simulation Buttons Section
### Create Section Header
1. Right-click `TestControlPanel`**UI → Text - TextMeshPro**
2. Name it `SimulationHeader`
3. Configure:
- **Text**: "Flow Simulations"
- **Font Size**: 20
- **Font Style**: Bold
- **Color**: Cyan
4. Add **Layout Element**: Preferred Height = 30
### Create Simulation Buttons Container
1. Right-click `TestControlPanel`**Create Empty**
2. Name it `SimulationButtonsContainer`
3. Add **Vertical Layout Group** (spacing=5)
4. Add **Layout Element**: Preferred Height = 200
### Add Simulation Buttons (4 buttons)
Create these buttons (same process as state buttons):
1. `Button_SimulateNew` → "Simulate NEW Card" → `SimulateNewCardFlow()`
2. `Button_SimulateRepeat` → "Simulate REPEAT Card" → `SimulateRepeatCardFlow()`
3. `Button_SimulateUpgrade` → "Simulate UPGRADE (5/5)" → `SimulateUpgradeFlow()`
4. `Button_SimulateAlbum` → "Simulate Album Placement" → `SimulateAlbumPlacementFlow()`
---
## Step 10: Create Card Setup Controls Section
### Create Section Header
1. Right-click `TestControlPanel`**UI → Text - TextMeshPro**
2. Name it `SetupHeader`
3. Configure:
- **Text**: "Card Setup"
- **Font Size**: 20
- **Font Style**: Bold
- **Color**: Green
4. Add **Layout Element**: Preferred Height = 30
### Create Setup Container
1. Right-click `TestControlPanel`**Create Empty**
2. Name it `SetupContainer`
3. Add **Vertical Layout Group** (spacing=8)
4. Add **Layout Element**: Preferred Height = 180
### Add "Is New Card" Toggle
1. Right-click `SetupContainer`**UI → Toggle**
2. Name it `Toggle_IsNew`
3. Configure label text: "Is New Card"
4. Add **Layout Element**: Preferred Height = 30
### Add "Repeat Count" Slider
1. Right-click `SetupContainer`**UI → Slider**
2. Name it `Slider_RepeatCount`
3. Configure **Slider** component:
- **Min Value**: 0
- **Max Value**: 5
- **Whole Numbers**: ✓
- **Value**: 0
4. Add **Layout Element**: Preferred Height = 30
### Add Repeat Count Label
1. Right-click `SetupContainer`**UI → Text - TextMeshPro**
2. Name it `Label_RepeatCount`
3. Configure:
- **Text**: "0/5"
- **Font Size**: 18
- **Alignment**: Center
4. Add **Layout Element**: Preferred Height = 25
### Add "Rarity" Dropdown
1. Right-click `SetupContainer`**UI → Dropdown - TextMeshPro**
2. Name it `Dropdown_Rarity`
3. Configure **TMP_Dropdown** component:
- **Options**: Common, Uncommon, Rare, Epic, Legendary
4. Add **Layout Element**: Preferred Height = 35
### Add "Apply Setup" Button
1. Right-click `SetupContainer`**UI → Button - TextMeshPro**
2. Name it `Button_ApplySetup`
3. Configure:
- **Text**: "Apply Card Setup"
- **On Click()**: `CardTestController → ApplyCardSetup()`
4. Add **Layout Element**: Preferred Height = 40
---
## Step 11: Create Clickability Toggle
1. Right-click `TestControlPanel`**UI → Toggle**
2. Name it `Toggle_IsClickable`
3. Configure label text: "Card Is Clickable"
4. Set **Is On**: ✓ (checked by default)
5. Add **Layout Element**: Preferred Height = 30
---
## Step 12: Create Animation Test Buttons Section
### Create Section Header
1. Right-click `TestControlPanel`**UI → Text - TextMeshPro**
2. Name it `AnimationHeader`
3. Configure:
- **Text**: "Animation Tests"
- **Font Size**: 20
- **Font Style**: Bold
- **Color**: Orange
4. Add **Layout Element**: Preferred Height = 30
### Create Animation Buttons Container
1. Right-click `TestControlPanel`**Create Empty**
2. Name it `AnimationButtonsContainer`
3. Add **Vertical Layout Group** (spacing=5)
4. Add **Layout Element**: Preferred Height = 150
### Add Animation Buttons (4 buttons)
1. `Button_PlayFlip` → "Play Flip" → `PlayFlipAnimation()`
2. `Button_PlayEnlarge` → "Play Enlarge" → `PlayEnlargeAnimation()`
3. `Button_PlayShrink` → "Play Shrink" → `PlayShrinkAnimation()`
4. `Button_StartHover` → "Start Idle Hover" → `StartIdleHoverAnimation()`
---
## Step 13: Create Event Log Section
### Create Section Header
1. Right-click `TestControlPanel`**UI → Text - TextMeshPro**
2. Name it `EventLogHeader`
3. Configure:
- **Text**: "Event Log"
- **Font Size**: 20
- **Font Style**: Bold
- **Color**: White
4. Add **Layout Element**: Preferred Height = 30
### Create Scroll View for Event Log
1. Right-click `TestControlPanel`**UI → Scroll View**
2. Name it `EventLogScrollView`
3. Configure:
- **Vertical Scrollbar**: Visible, auto-hide
- **Horizontal Scrollbar**: Hidden
4. Add **Layout Element**:
- **Preferred Height**: 300
- **Flexible Height**: 1
### Configure Event Log Text
1. Navigate to `EventLogScrollView → Viewport → Content`
2. Select the **Content** GameObject
3. Add **Content Size Fitter**:
- **Vertical Fit**: Preferred Size
4. Add **Vertical Layout Group**:
- **Child Force Expand**: Height ✗
5. Right-click `Content`**UI → Text - TextMeshPro**
6. Name it `EventLogText`
7. Configure:
- **Text**: "(Event log will appear here)"
- **Font Size**: 14
- **Alignment**: Top-Left
- **Color**: Light Green
- **Wrapping**: Enabled
- **Overflow**: Overflow
---
## Step 14: Create Utility Buttons Section
### Create Utility Buttons Container
1. Right-click `TestControlPanel`**Create Empty**
2. Name it `UtilityButtonsContainer`
3. Add **Horizontal Layout Group** (spacing=10)
4. Add **Layout Element**: Preferred Height = 50
### Add Utility Buttons (2 buttons)
1. `Button_ResetPosition` → "Reset Position" → `ResetCardPosition()`
2. `Button_ClearLog` → "Clear Log" → `ClearEventLog()`
---
## Step 15: Setup CardTestController Component
### Add CardTestController Script
1. Create a new **Empty GameObject** under `TestCanvas`
2. Name it `CardTestController`
3. Add Component → **Card Test Controller**
### Assign References
1. Select `CardTestController` GameObject
2. In **Card Test Controller** component, assign:
- **Test Card**: Drag `TestCard` from hierarchy
- **Test Card Data**: Drag a CardData ScriptableObject from Project
- **Slot 1**: Drag `AlbumSlot1` from hierarchy
- **Slot 2**: Drag `AlbumSlot2` from hierarchy
- **Event Log Text**: Drag `EventLogText` from hierarchy
- **Is New Toggle**: Drag `Toggle_IsNew` from hierarchy
- **Repeat Count Slider**: Drag `Slider_RepeatCount` from hierarchy
- **Repeat Count Label**: Drag `Label_RepeatCount` from hierarchy
- **Rarity Dropdown**: Drag `Dropdown_Rarity` from hierarchy
- **Is Clickable Toggle**: Drag `Toggle_IsClickable` from hierarchy
- **Current State Text**: Drag `CurrentStateText` from hierarchy
---
## Step 16: Wire Up All Button Events
For each button created earlier, select it and configure **On Click()**:
1. Click **+** to add event
2. Drag `CardTestController` GameObject to object field
3. Select the corresponding function from dropdown
**State Transition Buttons:**
- `Button_IdleState``CardTestController.TransitionToIdleState`
- `Button_RevealedState``CardTestController.TransitionToRevealedState`
- `Button_EnlargedNewState``CardTestController.TransitionToEnlargedNewState`
- `Button_EnlargedRepeatState``CardTestController.TransitionToEnlargedRepeatState`
- `Button_DraggingState``CardTestController.TransitionToDraggingState`
- `Button_PlacedInSlotState``CardTestController.TransitionToPlacedInSlotState`
- `Button_AlbumEnlargedState``CardTestController.TransitionToAlbumEnlargedState`
**Simulation Buttons:**
- `Button_SimulateNew``CardTestController.SimulateNewCardFlow`
- `Button_SimulateRepeat``CardTestController.SimulateRepeatCardFlow`
- `Button_SimulateUpgrade``CardTestController.SimulateUpgradeFlow`
- `Button_SimulateAlbum``CardTestController.SimulateAlbumPlacementFlow`
**Setup Button:**
- `Button_ApplySetup``CardTestController.ApplyCardSetup`
**Animation Buttons:**
- `Button_PlayFlip``CardTestController.PlayFlipAnimation`
- `Button_PlayEnlarge``CardTestController.PlayEnlargeAnimation`
- `Button_PlayShrink``CardTestController.PlayShrinkAnimation`
- `Button_StartHover``CardTestController.StartIdleHoverAnimation`
**Utility Buttons:**
- `Button_ResetPosition``CardTestController.ResetCardPosition`
- `Button_ClearLog``CardTestController.ClearEventLog`
---
## Step 17: Create Test Card Data Asset (If Needed)
If you don't have a test CardData asset:
1. Right-click in `Assets/Data/CardSystem/`**Create → AppleHills → Card Data**
2. Name it `TestCardData_Common`
3. Configure:
- **Card Name**: "Test Pikachu"
- **Rarity**: Common
- **Copies Owned**: 0
- **Zone**: Any test zone
- Assign sprites if available
4. Drag this asset to **Test Card Data** field in CardTestController
---
## Step 18: Test the Scene
### Play Mode Tests
1. **Press Play**
2. Verify **Current State Text** shows "IdleState"
3. Click **"Simulate NEW Card"** button
4. Click the card in the center - it should flip and enlarge
5. Watch **Event Log** for event messages
6. Tap enlarged card - it should shrink to RevealedState
7. Try other simulation buttons
8. Test manual state transitions
9. Test animation buttons
### Expected Behaviors
| Test | Expected Result |
|------|----------------|
| Click card in IdleState | Flips and transitions to EnlargedNewState or EnlargedRepeatState |
| Simulate NEW Card | Card flips → shows NEW badge → tap → shrinks to RevealedState |
| Simulate REPEAT (3/5) | Card flips → shows progress bar (3/5) → blinks → tap → shrinks |
| Simulate UPGRADE (5/5) | Card flips → progress (5/5) → auto-upgrades → shows NEW at higher rarity |
| Drag to slot | Card enters DraggingState → scales up → drops in slot → PlacedInSlotState |
| Toggle "Is Clickable" OFF | Card ignores clicks |
| Reset Position | Card returns to center |
---
## Troubleshooting
### Issue: Buttons don't respond
- **Check:** Event System exists in scene
- **Check:** Button On Click() events are wired to CardTestController
- **Check:** CardTestController component is on a GameObject
### Issue: Card doesn't appear
- **Check:** Card prefab is instantiated under CardSpawnPoint
- **Check:** Card has CardContext, CardAnimator, CardStateMachine components
- **Check:** TestCardData asset is assigned
### Issue: Event Log shows nothing
- **Check:** EventLogText is assigned in CardTestController
- **Check:** CardContext events are being fired (check Console for logs)
### Issue: State transitions don't work
- **Check:** Card has AppleMachine with states configured
- **Check:** States are named correctly (case-sensitive)
- **Check:** Default State is set to IdleState in AppleMachine
### Issue: Progress bar doesn't show
- **Check:** ProgressBarUI is child of EnlargedRepeatState
- **Check:** ProgressBarController component exists and has 5 child Images
- **Check:** Repeat count is > 0 when transitioning to EnlargedRepeatState
---
## Final Hierarchy Overview
```
CardSystemTestScene
├─ TestCanvas (Canvas)
│ ├─ CardTestArea (RectTransform - 70% width)
│ │ ├─ Background (Image)
│ │ ├─ CardSpawnPoint
│ │ │ └─ TestCard (Card prefab instance)
│ │ ├─ AlbumSlot1 (AlbumCardSlot)
│ │ │ └─ SlotBackground (Image)
│ │ └─ AlbumSlot2 (AlbumCardSlot)
│ │ └─ SlotBackground (Image)
│ │
│ ├─ TestControlPanel (Panel - 30% width, right side)
│ │ ├─ CurrentStateText (TextMeshPro)
│ │ ├─ StateButtonsHeader (TextMeshPro)
│ │ ├─ StateButtonsContainer
│ │ │ ├─ Button_IdleState
│ │ │ ├─ Button_RevealedState
│ │ │ ├─ Button_EnlargedNewState
│ │ │ ├─ Button_EnlargedRepeatState
│ │ │ ├─ Button_DraggingState
│ │ │ ├─ Button_PlacedInSlotState
│ │ │ └─ Button_AlbumEnlargedState
│ │ ├─ SimulationHeader (TextMeshPro)
│ │ ├─ SimulationButtonsContainer
│ │ │ ├─ Button_SimulateNew
│ │ │ ├─ Button_SimulateRepeat
│ │ │ ├─ Button_SimulateUpgrade
│ │ │ └─ Button_SimulateAlbum
│ │ ├─ SetupHeader (TextMeshPro)
│ │ ├─ SetupContainer
│ │ │ ├─ Toggle_IsNew
│ │ │ ├─ Slider_RepeatCount
│ │ │ ├─ Label_RepeatCount
│ │ │ ├─ Dropdown_Rarity
│ │ │ └─ Button_ApplySetup
│ │ ├─ Toggle_IsClickable
│ │ ├─ AnimationHeader (TextMeshPro)
│ │ ├─ AnimationButtonsContainer
│ │ │ ├─ Button_PlayFlip
│ │ │ ├─ Button_PlayEnlarge
│ │ │ ├─ Button_PlayShrink
│ │ │ └─ Button_StartHover
│ │ ├─ EventLogHeader (TextMeshPro)
│ │ ├─ EventLogScrollView
│ │ │ └─ Viewport → Content
│ │ │ └─ EventLogText (TextMeshPro)
│ │ └─ UtilityButtonsContainer
│ │ ├─ Button_ResetPosition
│ │ └─ Button_ClearLog
│ │
│ └─ CardTestController (Empty GameObject with CardTestController component)
└─ EventSystem
```
---
## Success Criteria
✅ Scene opens without errors
✅ Card appears in center of left panel
✅ All buttons are visible and labeled
✅ Current State display shows active state
✅ Event log displays messages when events fire
✅ Card responds to clicks and state transitions
✅ Simulation buttons work (NEW, REPEAT, UPGRADE flows)
✅ Drag to album slots works
✅ Reset position returns card to center
✅ All 7 states can be manually triggered
**Once all criteria met, you have a fully functional Card testing scene! 🎉**