diff --git a/Assets/Editor/CardSystem/CardSystemLivePreview.cs b/Assets/Editor/CardSystem/CardSystemLivePreview.cs index 09e24655..f81b2b5c 100644 --- a/Assets/Editor/CardSystem/CardSystemLivePreview.cs +++ b/Assets/Editor/CardSystem/CardSystemLivePreview.cs @@ -75,6 +75,7 @@ namespace AppleHills.Editor CardSystemManager.Instance.OnCardCollected += OnCardCollected; CardSystemManager.Instance.OnBoosterCountChanged += OnBoosterCountChanged; CardSystemManager.Instance.OnPendingCardAdded += OnPendingCardAdded; + CardSystemManager.Instance.OnPendingCardRemoved += OnPendingCardRemoved; isSubscribed = true; Debug.Log("[CardSystemLivePreview] Subscribed to CardSystemManager events"); @@ -91,6 +92,7 @@ namespace AppleHills.Editor CardSystemManager.Instance.OnCardCollected -= OnCardCollected; CardSystemManager.Instance.OnBoosterCountChanged -= OnBoosterCountChanged; CardSystemManager.Instance.OnPendingCardAdded -= OnPendingCardAdded; + CardSystemManager.Instance.OnPendingCardRemoved -= OnPendingCardRemoved; } isSubscribed = false; @@ -125,6 +127,13 @@ namespace AppleHills.Editor Repaint(); } + private void OnPendingCardRemoved(CardData card) + { + lastEventMessage = $"Card removed from pending: {card.Name} ({card.Rarity}) - being placed"; + RefreshData(); + Repaint(); + } + private void RefreshData() { if (!Application.isPlaying || CardSystemManager.Instance == null) return; diff --git a/Assets/Prefabs/UI/CardsSystem/Boosters/BoosterOpeningPage.prefab b/Assets/Prefabs/UI/CardsSystem/BoosterOpeningPage.prefab similarity index 99% rename from Assets/Prefabs/UI/CardsSystem/Boosters/BoosterOpeningPage.prefab rename to Assets/Prefabs/UI/CardsSystem/BoosterOpeningPage.prefab index 6df02197..c53a82d3 100644 --- a/Assets/Prefabs/UI/CardsSystem/Boosters/BoosterOpeningPage.prefab +++ b/Assets/Prefabs/UI/CardsSystem/BoosterOpeningPage.prefab @@ -77,6 +77,8 @@ MonoBehaviour: cardDisplayContainer: {fileID: 4830022034953347571} cardPrefab: {fileID: 7504168507910195884, guid: c1795924899c08343a189300904ed424, type: 3} cardSpacing: 500 + cardWidth: 400 + cardHeight: 540 boosterDisappearDuration: 0.5 impulseSource: {fileID: 4448843358972162772} openingParticleSystem: {fileID: 0} @@ -171,7 +173,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 500, y: 500} + m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 1, y: 0} --- !u!114 &415627682025321105 MonoBehaviour: @@ -638,11 +640,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_AnchoredPosition.x - value: 191 + value: 24 objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_AnchoredPosition.y - value: -0 + value: 263 objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -748,11 +750,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_AnchoredPosition.x - value: 21 + value: -146 objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_AnchoredPosition.y - value: -36 + value: 227 objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -866,11 +868,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_AnchoredPosition.x - value: -132 + value: -299 objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_AnchoredPosition.y - value: -181 + value: 82 objectReference: {fileID: 0} - target: {fileID: 4310919426181576387, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -998,6 +1000,10 @@ PrefabInstance: propertyPath: m_Name value: CenterBoosterSlot objectReference: {fileID: 0} + - target: {fileID: 6647899082618247385, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} + propertyPath: filterByType + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6647899082618247385, guid: 561f7c561a416e54e9bf1c2af2f3f4ef, type: 3} propertyPath: hideImageOnPlay value: 0 diff --git a/Assets/Prefabs/UI/CardsSystem/Boosters/BoosterOpeningPage.prefab.meta b/Assets/Prefabs/UI/CardsSystem/BoosterOpeningPage.prefab.meta similarity index 100% rename from Assets/Prefabs/UI/CardsSystem/Boosters/BoosterOpeningPage.prefab.meta rename to Assets/Prefabs/UI/CardsSystem/BoosterOpeningPage.prefab.meta diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCard.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCard.prefab deleted file mode 100644 index c854a68c..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCard.prefab +++ /dev/null @@ -1,215 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3697348702925017591 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8576570241677955255} - - component: {fileID: 5397984527285824388} - - component: {fileID: 5080215318866393190} - m_Layer: 5 - m_Name: AlbumCard - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &8576570241677955255 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3697348702925017591} - 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: 593327658551090324} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 540} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &5397984527285824388 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3697348702925017591} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.AspectRatioFitter - m_AspectMode: 2 - m_AspectRatio: 0.7407407 ---- !u!114 &5080215318866393190 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3697348702925017591} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 258a530448814715b5ec19737df2a658, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCard - cardDisplay: {fileID: 3062738042043309247} - backdropImage: {fileID: 0} - enlargedScale: 2.5 - scaleDuration: 0.3 ---- !u!1001 &2530689326119009629 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 8576570241677955255} - m_Modifications: - - target: {fileID: 790099756778783334, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1802458852284665438, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5533787515014034956, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_Name - value: Card - objectReference: {fileID: 0} - - target: {fileID: 7441149886460635393, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_fontSize - value: 55 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} ---- !u!224 &593327658551090324 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - m_PrefabInstance: {fileID: 2530689326119009629} - m_PrefabAsset: {fileID: 0} ---- !u!114 &3062738042043309247 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 693510968212398562, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - m_PrefabInstance: {fileID: 2530689326119009629} - 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 diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCard.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCard.prefab.meta deleted file mode 100644 index 7e2f70b0..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCard.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1d8cc8d9238eec34b8e600e7050e2979 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumPlacementCard.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/AlbumPlacementCard.prefab deleted file mode 100644 index 7b4116b3..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumPlacementCard.prefab +++ /dev/null @@ -1,358 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1275563675283742273 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4689562168107797719} - - component: {fileID: 1691790559549813443} - m_Layer: 0 - m_Name: AlbumPlacementCard - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &4689562168107797719 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1275563675283742273} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7701563473015326516} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 400, y: 540} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1691790559549813443 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1275563675283742273} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 706803638ea24880bae19c87d3851ce6, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCardDraggable - moveSpeed: 1500 - smoothMovement: 0 - snapDuration: 0.3 - visual: {fileID: 0} - isSelectable: 1 - selectionOffset: 10 - flippableCard: {fileID: 3814888273534605961} - holdRevealDelay: 0.3 ---- !u!1001 &9020921157083249943 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 4689562168107797719} - m_Modifications: - - target: {fileID: 800304281239603981, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1571786155082116174, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1657266364921102667, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2705687956353102842, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3944615060647018691, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3944615060647018691, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3944615060647018691, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4874164524383443800, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5044057968005998777, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: albumCard - value: - objectReference: {fileID: 5164901602697649867} - - target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: cardDisplay - value: - objectReference: {fileID: 3147152248387533330} - - target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: enableIdleHover - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: idleHoverHeight - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 6193987373793698945, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7308531005971043100, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8595097391291779023, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9060030918047515996, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - propertyPath: m_Name - value: FlippableCardPrefab - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} ---- !u!114 &3147152248387533330 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 6240953021224011525, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - m_PrefabInstance: {fileID: 9020921157083249943} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 72cb26621865420aa763a66c06eb7f6d, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.CardDisplay ---- !u!114 &3814888273534605961 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5314682225669040030, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - m_PrefabInstance: {fileID: 9020921157083249943} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ffa05ec4ecbd4cc485e2127683c29f09, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.FlippableCard ---- !u!114 &5164901602697649867 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 4223766615757628380, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - m_PrefabInstance: {fileID: 9020921157083249943} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 258a530448814715b5ec19737df2a658, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCard ---- !u!224 &7701563473015326516 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 1716378143019989539, guid: e16716863eca4704fbfabef5a699b5aa, type: 3} - m_PrefabInstance: {fileID: 9020921157083249943} - m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumPlacementCard.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Cards/AlbumPlacementCard.prefab.meta deleted file mode 100644 index 025bf668..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumPlacementCard.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: aca553283b12f314795f62d785d01912 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/CardBack.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/CardBack.prefab deleted file mode 100644 index ca8bd225..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/CardBack.prefab +++ /dev/null @@ -1,173 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1123573611284110918 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6372631110979469063} - - component: {fileID: 7263329479413350620} - - component: {fileID: 1924940828255795114} - - component: {fileID: 740275584674789932} - m_Layer: 5 - m_Name: CardBackImage - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &6372631110979469063 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1123573611284110918} - 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: 4459518969173100332} - 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 &7263329479413350620 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1123573611284110918} - m_CullTransparentMesh: 1 ---- !u!114 &1924940828255795114 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1123573611284110918} - 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!114 &740275584674789932 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1123573611284110918} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.AspectRatioFitter - m_AspectMode: 2 - m_AspectRatio: 0.7 ---- !u!1 &1385409402919571665 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4459518969173100332} - - component: {fileID: 2773297167970136146} - m_Layer: 5 - m_Name: CardBack - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &4459518969173100332 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1385409402919571665} - 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: 6372631110979469063} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 150, y: 200} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2773297167970136146 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1385409402919571665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 0} - m_OnClick: - m_PersistentCalls: - m_Calls: [] diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/Card_WithCanvas.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/Card_WithCanvas.prefab deleted file mode 100644 index 4322cf9c..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/Card_WithCanvas.prefab +++ /dev/null @@ -1,278 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &6037397584506428625 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6092374155348651304} - - component: {fileID: 8318669147161080742} - - component: {fileID: 5069851050693410091} - m_Layer: 5 - m_Name: Card_WithCanvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &6092374155348651304 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6037397584506428625} - 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: 4316705616323939100} - 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!223 &8318669147161080742 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6037397584506428625} - 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: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &5069851050693410091 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6037397584506428625} - 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: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!1001 &1210685683967208149 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 6092374155348651304} - m_Modifications: - - target: {fileID: 790099756778783334, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1802458852284665438, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 2233823152869352954, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SortingLayer - value: 32709 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMin.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMin.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 400 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.y - value: 600 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3278322763364327330, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SortingLayer - value: 32709 - objectReference: {fileID: 0} - - target: {fileID: 4154531725895339817, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SortingLayer - value: 32709 - objectReference: {fileID: 0} - - target: {fileID: 4172705149881203555, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SortingLayer - value: 32709 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4210468743547155963, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5533787515014034956, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_Name - value: Card - objectReference: {fileID: 0} - - target: {fileID: 6873802290340156791, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_VerticalFit - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 6873802290340156791, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_HorizontalFit - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8586733118747829166, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_PreferredWidth - value: 675 - objectReference: {fileID: 0} - - target: {fileID: 8586733118747829166, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_PreferredHeight - value: 900 - objectReference: {fileID: 0} - - target: {fileID: 8734133528971135044, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SortingLayer - value: 32709 - objectReference: {fileID: 0} - - target: {fileID: 9058514114635829985, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - propertyPath: m_SortingLayer - value: 32709 - objectReference: {fileID: 0} - m_RemovedComponents: - - {fileID: 3817047883008048339, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - m_RemovedGameObjects: - - {fileID: 7420988228568889101, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} ---- !u!224 &4316705616323939100 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3} - m_PrefabInstance: {fileID: 1210685683967208149} - m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/Card_WithCanvas.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Cards/Card_WithCanvas.prefab.meta deleted file mode 100644 index f2584c69..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/Card_WithCanvas.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 48e5d2bf88a3b914d966bd9b17c9d3b7 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/EmptyPrefab.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/EmptyPrefab.prefab deleted file mode 100644 index d17c7b78..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/EmptyPrefab.prefab +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &666061725648654652 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8002664199913995372} - m_Layer: 0 - m_Name: EmptyPrefab - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &8002664199913995372 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 666061725648654652} - 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} diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/EmptyPrefab.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Cards/EmptyPrefab.prefab.meta deleted file mode 100644 index 1eb0d94f..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/EmptyPrefab.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a608484c63e38d643b8a0f094b30e7ed -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/FlippableCardPrefab.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/FlippableCardPrefab.prefab deleted file mode 100644 index 86d1d96a..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/FlippableCardPrefab.prefab +++ /dev/null @@ -1,963 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2592418251725585151 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2124645323449894959} - - component: {fileID: 4796702999672489241} - - component: {fileID: 3137319209721935388} - m_Layer: 0 - m_Name: CardBack - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2124645323449894959 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2592418251725585151} - 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: 1716378143019989539} - 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 &4796702999672489241 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2592418251725585151} - m_CullTransparentMesh: 1 ---- !u!114 &3137319209721935388 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2592418251725585151} - 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 &2691095965985708622 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1318588240326811233} - m_Layer: 0 - m_Name: CardFront - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1318588240326811233 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2691095965985708622} - 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: 800304281239603981} - m_Father: {fileID: 1716378143019989539} - 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!1 &3802662965106921097 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7428568180257528617} - - component: {fileID: 5545241165728741220} - - component: {fileID: 1041811482080693425} - m_Layer: 0 - m_Name: NewCardOpen - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7428568180257528617 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3802662965106921097} - 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: 1716378143019989539} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: 125} - m_SizeDelta: {x: 600, y: 120} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &5545241165728741220 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3802662965106921097} - m_CullTransparentMesh: 1 ---- !u!114 &1041811482080693425 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3802662965106921097} - 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: 125 - m_fontSizeBase: 125 - m_fontWeight: 400 - m_enableAutoSizing: 0 - 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 &7979281912729275558 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7697079590827463347} - - component: {fileID: 7910736208233151752} - - component: {fileID: 4976791221096228004} - m_Layer: 0 - m_Name: CardCountIncreaseIdle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7697079590827463347 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7979281912729275558} - 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: 1716378143019989539} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -531} - m_SizeDelta: {x: 600, y: 150} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &7910736208233151752 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7979281912729275558} - m_CullTransparentMesh: 1 ---- !u!114 &4976791221096228004 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7979281912729275558} - 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: 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: 75 - m_fontSizeBase: 75 - m_fontWeight: 400 - m_enableAutoSizing: 0 - 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 &8335972675955266088 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4113316370682182888} - - component: {fileID: 3062107932519145925} - - component: {fileID: 5749174771773974227} - m_Layer: 0 - m_Name: NewCardIdle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &4113316370682182888 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8335972675955266088} - 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: 1716378143019989539} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -531} - m_SizeDelta: {x: 600, y: 150} - m_Pivot: {x: 0.5, y: 1} ---- !u!222 &3062107932519145925 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8335972675955266088} - m_CullTransparentMesh: 1 ---- !u!114 &5749174771773974227 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8335972675955266088} - 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: 75 - m_fontSizeBase: 75 - m_fontWeight: 400 - m_enableAutoSizing: 0 - 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 &9060030918047515996 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1716378143019989539} - - component: {fileID: 5314682225669040030} - m_Layer: 0 - m_Name: FlippableCardPrefab - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1716378143019989539 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9060030918047515996} - 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: 2124645323449894959} - - {fileID: 1318588240326811233} - - {fileID: 7428568180257528617} - - {fileID: 4113316370682182888} - - {fileID: 7697079590827463347} - - {fileID: 4945390406745498856} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 400, y: 540} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &5314682225669040030 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 9060030918047515996} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ffa05ec4ecbd4cc485e2127683c29f09, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.FlippableCard - cardBackObject: {fileID: 2592418251725585151} - cardFrontObject: {fileID: 2691095965985708622} - cardDisplay: {fileID: 6240953021224011525} - albumCard: {fileID: 4223766615757628380} - enableIdleHover: 1 - newCardText: {fileID: 3802662965106921097} - newCardIdleText: {fileID: 8335972675955266088} - repeatText: {fileID: 7979281912729275558} - progressBarContainer: {fileID: 1938654216571238436} ---- !u!1001 &7640944115072447751 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1716378143019989539} - 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: 0.5 - 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.5 - objectReference: {fileID: 0} - - target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3} - propertyPath: m_SizeDelta.x - value: 30 - objectReference: {fileID: 0} - - target: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3} - propertyPath: m_SizeDelta.y - value: 540 - 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: -51 - 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!1 &1938654216571238436 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 8137280556209245475, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3} - m_PrefabInstance: {fileID: 7640944115072447751} - m_PrefabAsset: {fileID: 0} ---- !u!224 &4945390406745498856 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 3362949153200116207, guid: e3ca4613f52caec4bb1b8d2d8a4aa6d0, type: 3} - m_PrefabInstance: {fileID: 7640944115072447751} - m_PrefabAsset: {fileID: 0} ---- !u!1001 &8943403053347003322 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 1318588240326811233} - m_Modifications: - - target: {fileID: 1833043711021369510, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3019715237329649467, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3697348702925017591, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_Name - value: AlbumCard - objectReference: {fileID: 0} - - target: {fileID: 4187589325650506499, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4925415087786595420, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_fontSize - value: 54.45 - objectReference: {fileID: 0} - - target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5378230129755544441, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchorMax.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchorMax.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchorMin.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchorMin.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_SizeDelta.y - value: 540 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_AnchoredPosition.y - value: 16 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} ---- !u!224 &800304281239603981 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 8576570241677955255, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - m_PrefabInstance: {fileID: 8943403053347003322} - m_PrefabAsset: {fileID: 0} ---- !u!114 &4223766615757628380 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5080215318866393190, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - m_PrefabInstance: {fileID: 8943403053347003322} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 258a530448814715b5ec19737df2a658, type: 3} - m_Name: - m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.AlbumCard ---- !u!114 &6240953021224011525 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 3062738042043309247, guid: 1d8cc8d9238eec34b8e600e7050e2979, type: 3} - m_PrefabInstance: {fileID: 8943403053347003322} - m_PrefabAsset: {fileID: 0} - m_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 diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/FlippableCardPrefab.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Cards/FlippableCardPrefab.prefab.meta deleted file mode 100644 index b927d517..00000000 --- a/Assets/Prefabs/UI/CardsSystem/Cards/FlippableCardPrefab.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: e16716863eca4704fbfabef5a699b5aa -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/NewCard.prefab b/Assets/Prefabs/UI/CardsSystem/Cards/NewCard.prefab index 8ead0226..7182846c 100644 --- a/Assets/Prefabs/UI/CardsSystem/Cards/NewCard.prefab +++ b/Assets/Prefabs/UI/CardsSystem/Cards/NewCard.prefab @@ -864,7 +864,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 87ed5616041a4d878f452a8741e1eeab, type: 3} m_Name: m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.StateMachine.CardStateMachine - defaultState: {fileID: 8567459193246203383} + defaultState: {fileID: 0} currentState: {fileID: 0} _unityEventsFolded: 0 verbose: 0 diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/CardBack.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Slots.meta similarity index 57% rename from Assets/Prefabs/UI/CardsSystem/Cards/CardBack.prefab.meta rename to Assets/Prefabs/UI/CardsSystem/Slots.meta index a67205f5..ab2ab4ec 100644 --- a/Assets/Prefabs/UI/CardsSystem/Cards/CardBack.prefab.meta +++ b/Assets/Prefabs/UI/CardsSystem/Slots.meta @@ -1,6 +1,7 @@ fileFormatVersion: 2 -guid: 1d048f366a1113d4ab16b5d332bfc11d -PrefabImporter: +guid: 6a109593abfcd2449906dd7a6da292c9 +folderAsset: yes +DefaultImporter: externalObjects: {} userData: assetBundleName: diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCardSlot.prefab b/Assets/Prefabs/UI/CardsSystem/Slots/AlbumCardSlot.prefab similarity index 100% rename from Assets/Prefabs/UI/CardsSystem/Cards/AlbumCardSlot.prefab rename to Assets/Prefabs/UI/CardsSystem/Slots/AlbumCardSlot.prefab diff --git a/Assets/Prefabs/UI/CardsSystem/Cards/AlbumCardSlot.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Slots/AlbumCardSlot.prefab.meta similarity index 100% rename from Assets/Prefabs/UI/CardsSystem/Cards/AlbumCardSlot.prefab.meta rename to Assets/Prefabs/UI/CardsSystem/Slots/AlbumCardSlot.prefab.meta diff --git a/Assets/Prefabs/UI/CardsSystem/BaseSlot.prefab b/Assets/Prefabs/UI/CardsSystem/Slots/BaseSlot.prefab similarity index 100% rename from Assets/Prefabs/UI/CardsSystem/BaseSlot.prefab rename to Assets/Prefabs/UI/CardsSystem/Slots/BaseSlot.prefab diff --git a/Assets/Prefabs/UI/CardsSystem/BaseSlot.prefab.meta b/Assets/Prefabs/UI/CardsSystem/Slots/BaseSlot.prefab.meta similarity index 100% rename from Assets/Prefabs/UI/CardsSystem/BaseSlot.prefab.meta rename to Assets/Prefabs/UI/CardsSystem/Slots/BaseSlot.prefab.meta diff --git a/Assets/Scripts/Data/CardSystem/CardSystemManager.cs b/Assets/Scripts/Data/CardSystem/CardSystemManager.cs index 5bf48d07..daeb362f 100644 --- a/Assets/Scripts/Data/CardSystem/CardSystemManager.cs +++ b/Assets/Scripts/Data/CardSystem/CardSystemManager.cs @@ -42,6 +42,7 @@ namespace Data.CardSystem public event Action OnCardCollected; public event Action OnBoosterCountChanged; public event Action OnPendingCardAdded; + public event Action OnPendingCardRemoved; public event Action OnCardPlacedInAlbum; internal override void OnManagedAwake() @@ -492,11 +493,28 @@ namespace Data.CardSystem #region Album System /// - /// Returns all cards waiting to be placed in the album + /// Returns all pending reveal cards (cards waiting to be placed in album) /// public List GetPendingRevealCards() { - return new List(_pendingRevealCards); + return _pendingRevealCards; + } + + /// + /// Remove a card from the pending reveal list and fire event. + /// Called when a card starts being dragged to album slot. + /// + public bool RemoveFromPending(CardData card) + { + if (card == null) return false; + + bool removed = _pendingRevealCards.Remove(card); + if (removed) + { + OnPendingCardRemoved?.Invoke(card); + Logging.Debug($"[CardSystemManager] Removed '{card.Name}' from pending reveal cards"); + } + return removed; } /// @@ -563,26 +581,37 @@ namespace Data.CardSystem /// /// Marks a card as placed in the album - /// Moves it from pending reveal to owned inventory + /// Adds card to owned inventory and tracks as placed + /// Note: Card may have already been removed from pending list during drag /// public void MarkCardAsPlaced(CardData card) { - if (_pendingRevealCards.Remove(card)) + if (card == null) { - // Add to owned inventory - playerInventory.AddCard(card); - - // Track as placed - _placedInAlbumCardIds.Add(card.Id); - - OnCardPlacedInAlbum?.Invoke(card); - OnCardCollected?.Invoke(card); - - Logging.Debug($"[CardSystemManager] Card '{card.Name}' placed in album and added to inventory."); + Logging.Warning("[CardSystemManager] Attempted to place null card"); + return; + } + + // Try to remove from pending (may already be removed during drag) + bool wasInPending = _pendingRevealCards.Remove(card); + + // Add to owned inventory (regardless of whether it was in pending) + playerInventory.AddCard(card); + + // Track as placed + _placedInAlbumCardIds.Add(card.Id); + + // Fire events + OnCardPlacedInAlbum?.Invoke(card); + OnCardCollected?.Invoke(card); + + if (wasInPending) + { + Logging.Debug($"[CardSystemManager] Card '{card.Name}' removed from pending and added to inventory"); } else { - Logging.Warning($"[CardSystemManager] Attempted to place card '{card.Name}' but it wasn't in pending reveal list."); + Logging.Debug($"[CardSystemManager] Card '{card.Name}' added to inventory (was already removed from pending)"); } } diff --git a/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs b/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs index db79590f..a037d6f4 100644 --- a/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs +++ b/Assets/Scripts/UI/CardSystem/AlbumViewPage.cs @@ -43,10 +43,14 @@ namespace UI.CardSystem private List _pendingCornerCards = new List(); private const int MaxPendingCorner = 3; - // Pending card placement coordination - private StateMachine.Card _pendingPlacementCard; - private bool _waitingForPageFlip; - private bool _cardDragReleased; + // Page flip tracking (for card placement coordination) + private bool _isPageFlipping = false; + + /// + /// Query method: Check if the book is currently flipping to a page. + /// Used by card states to know if they should wait before placing. + /// + public bool IsPageFlipping => _isPageFlipping; internal override void OnManagedStart() { @@ -460,9 +464,7 @@ namespace UI.CardSystem } #endregion - - #region New Pending Corner Card System - + /// /// Find a slot by its SlotIndex property /// @@ -482,48 +484,123 @@ namespace UI.CardSystem } public void SpawnPendingCornerCards() + { + RebuildCornerCards(); + } + + /// + /// Rebuild corner card display from scratch. + /// Called on initial spawn and after card is removed. + /// + private void RebuildCornerCards() { if (cardPrefab == null || bottomRightSlots == null) return; + + // Step 1: Clear all existing cards from slots CleanupPendingCornerCards(); - // Get unique pending cards + // Step 2: Establish total amount and amount to display var uniquePending = GetUniquePendingCards(); + int totalPendingCards = uniquePending.Count; + int cardsToDisplay = Mathf.Min(totalPendingCards, MaxPendingCorner); - if (uniquePending.Count == 0) + if (cardsToDisplay == 0) { - Logging.Debug("[AlbumViewPage] No pending cards to spawn"); + Logging.Debug("[AlbumViewPage] No pending cards to display in corner"); return; } - // Spawn min(unique count, MaxPendingCorner) - int spawnCount = Mathf.Min(uniquePending.Count, MaxPendingCorner); - Logging.Debug($"[AlbumViewPage] Spawning {spawnCount} pending corner cards (out of {uniquePending.Count} unique pending)"); + Logging.Debug($"[AlbumViewPage] Rebuilding corner: displaying {cardsToDisplay} of {totalPendingCards} pending cards"); - for (int i = 0; i < spawnCount; i++) + // Step 3: Spawn cards, starting from slot index 0 -> 1 -> 2 + for (int slotIndex = 0; slotIndex < cardsToDisplay; slotIndex++) { - var slot = FindSlotByIndex(i); - if (slot == null) break; + // Step 3.1: Get slot with this index + var slot = FindSlotByIndex(slotIndex); + if (slot == null) + { + Logging.Warning($"[AlbumViewPage] Slot {slotIndex} not found, stopping spawn"); + break; + } - GameObject cardObj = Instantiate(cardPrefab, bottomRightSlots.transform); - var card = cardObj.GetComponent(); - if (card != null) - { - card.SetupForAlbumPending(); - card.AssignToSlot(slot, true); - - // Subscribe to both drag events - card.Context.OnDragStarted += OnCardDragStarted; - card.Context.OnDragEnded += OnCardDragEnded; - - _pendingCornerCards.Add(card); - } - else - { - Destroy(cardObj); - } + // Step 3.2 & 3.3: Spawn card in slot (matching transform, in PendingFaceDownState) + SpawnCardInSlot(slot); } } + /// + /// Spawn a single card in the specified slot. + /// Card will be in PendingFaceDownState and match slot transform. + /// + private void SpawnCardInSlot(DraggableSlot slot) + { + if (slot == null || cardPrefab == null) return; + + // Instantiate card as child of slot (not container) + GameObject cardObj = Instantiate(cardPrefab, slot.transform); + var card = cardObj.GetComponent(); + + if (card == null) + { + Logging.Warning("[AlbumViewPage] Card prefab missing Card component!"); + Destroy(cardObj); + return; + } + + // Setup card for pending state (transitions to PendingFaceDownState) + card.SetupForAlbumPending(); + + // Assign to slot (handles transform matching) + card.AssignToSlot(slot, false); // false = instant, no animation + + // Subscribe to drag events for reorganization + card.Context.OnDragStarted += OnCardDragStarted; + + // Track in list + _pendingCornerCards.Add(card); + + Logging.Debug($"[AlbumViewPage] Spawned card in slot {slot.SlotIndex}, state: {card.GetCurrentStateName()}"); + } + + /// + /// Handle card drag started - cleanup and unparent from corner slot + /// Rebuild happens in GetCardForPendingSlot after pending list is updated + /// + private void OnCardDragStarted(StateMachine.CardContext context) + { + if (context == null) return; + + var card = context.GetComponent(); + if (card == null) return; + + // Only handle pending corner cards + if (!_pendingCornerCards.Contains(card)) return; + + Logging.Debug($"[AlbumViewPage] Card drag started, removing from corner"); + + // 1. Remove from tracking (card is transitioning to placement flow) + _pendingCornerCards.Remove(card); + + // 2. Unsubscribe from this card's events + if (card.Context != null) + { + card.Context.OnDragStarted -= OnCardDragStarted; + } + + // 3. CRITICAL: Unparent from corner slot BEFORE rebuild happens + // This prevents the card from being destroyed when CleanupPendingCornerCards runs + // Reparent to this page's transform (or canvas) to keep it alive during drag + if (card.transform.parent != null) + { + card.transform.SetParent(transform, true); // Keep world position + Logging.Debug($"[AlbumViewPage] Card unparented from corner slot - safe for rebuild"); + } + + // Note: RebuildCornerCards() is called in GetCardForPendingSlot() + // after the card is removed from CardSystemManager's pending list + // The card is now safe from being destroyed since it's no longer a child of corner slots + } + /// /// Get unique pending cards (one per definition+rarity combo) /// @@ -560,6 +637,7 @@ namespace UI.CardSystem private void CleanupPendingCornerCards() { + // First, unsubscribe and destroy tracked cards foreach (var c in _pendingCornerCards) { if (c != null) @@ -567,124 +645,86 @@ namespace UI.CardSystem if (c.Context != null) { c.Context.OnDragStarted -= OnCardDragStarted; - c.Context.OnDragEnded -= OnCardDragEnded; } Destroy(c.gameObject); } } _pendingCornerCards.Clear(); - } - - private void OnCardDragStarted(StateMachine.CardContext context) - { - if (context == null) return; - // Only handle if in PendingFaceDownState - var card = context.GetComponent(); - if (card == null) return; - - string stateName = card.GetCurrentStateName(); - Logging.Debug($"[AlbumViewPage] OnCardDragStarted - Card state: {stateName}"); - - if (stateName != "PendingFaceDownState") return; - - // Select smart pending card data - var selected = SelectSmartPendingCard(); - if (selected == null) + // IMPORTANT: Also clear ALL children from corner slots + // This catches cards that were removed from tracking but not destroyed + // (e.g., cards being dragged to album) + if (bottomRightSlots != null) { - Logging.Warning("[AlbumViewPage] No pending card data available!"); - return; // no pending data - } - - Logging.Debug($"[AlbumViewPage] Selected card: {selected.Name} ({selected.DefinitionId}), Zone: {selected.Zone}"); - context.SetupCard(selected); - - // Find target page based on card's zone using BookTabButtons - int targetPage = FindPageForZone(selected.Zone); - Logging.Debug($"[AlbumViewPage] Target page for zone {selected.Zone}: {targetPage}"); - - if (targetPage >= 0) - { - // Always flip to the zone's page (even if already there, for consistency) - Logging.Debug($"[AlbumViewPage] Flipping to page {targetPage} for zone {selected.Zone}"); - _waitingForPageFlip = true; - _cardDragReleased = false; - _pendingPlacementCard = card; - - NavigateToAlbumPage(targetPage, OnPageFlipComplete); - } - else - { - // No valid page found for zone - don't wait for flip - Logging.Warning($"[AlbumViewPage] No BookTabButton found for zone {selected.Zone}"); - _waitingForPageFlip = false; - _cardDragReleased = false; - _pendingPlacementCard = card; - } - } - - private void OnCardDragEnded(StateMachine.CardContext context) - { - if (context == null) return; - - var card = context.GetComponent(); - if (card == null) return; - - // Only handle if this is the pending placement card - if (card != _pendingPlacementCard) return; - - Logging.Debug($"[AlbumViewPage] Card drag released for: {card.CardData?.Name}"); - - // Mark drag as released - don't capture slot yet (pages may still be flipping) - _cardDragReleased = true; - - // Try to place card (will check if flip is also complete) - TryPlaceCard(); - } - - private void OnPageFlipComplete() - { - Logging.Debug("[AlbumViewPage] Page flip complete"); - _waitingForPageFlip = false; - - // Try to place card (will check if drag is also released) - TryPlaceCard(); - } - - private void TryPlaceCard() - { - // Check if BOTH conditions are met: - // 1. Card has been drag-released - // 2. Page flip is complete (or wasn't needed) - if (_cardDragReleased && !_waitingForPageFlip) - { - if (_pendingPlacementCard == null || _pendingPlacementCard.CardData == null) + foreach (var slot in bottomRightSlots.Slots) { - Logging.Warning("[AlbumViewPage] TryPlaceCard - No pending card or card data"); - ResetPlacementState(); - return; + if (slot == null || slot.transform == null) continue; + + // Destroy all card children in this slot + for (int i = slot.transform.childCount - 1; i >= 0; i--) + { + var child = slot.transform.GetChild(i); + var card = child.GetComponent(); + if (card != null) + { + // Unsubscribe if somehow still subscribed + if (card.Context != null) + { + card.Context.OnDragStarted -= OnCardDragStarted; + } + Destroy(child.gameObject); + Logging.Debug($"[AlbumViewPage] Cleaned up orphaned card from slot {slot.SlotIndex}"); + } + } } - - // Find the correct slot for this card (AFTER pages have flipped) - var targetSlot = FindTargetSlotForCard(_pendingPlacementCard.CardData); - - if (targetSlot == null) - { - Logging.Warning($"[AlbumViewPage] No slot found for card {_pendingPlacementCard.CardData.DefinitionId}"); - // TODO: Return card to corner - ResetPlacementState(); - return; - } - - // Both conditions met and slot found - perform placement - PlaceCardInSlot(_pendingPlacementCard, targetSlot); } } + #region Query Methods for Card States (Data Providers) + + /// + /// Query method: Get card data for a pending slot. + /// Called by PendingFaceDownState when drag starts. + /// IMPORTANT: This removes the card from pending list immediately, then rebuilds corner. + /// + public CardData GetCardForPendingSlot() + { + if (CardSystemManager.Instance == null) return null; + var pending = CardSystemManager.Instance.GetPendingRevealCards(); + if (pending.Count == 0) return null; + + // Try current page match + var pageDefs = GetDefinitionsOnCurrentPage(); + var match = pending.Find(c => pageDefs.Contains(c.DefinitionId)); + + // If no match, use random + if (match == null) + { + int idx = Random.Range(0, pending.Count); + match = pending[idx]; + } + + // IMPORTANT: Remove from pending list immediately + // Card is now in "reveal flow" and will be added to collection when placed + if (match != null) + { + // Remove from pending using the manager (fires OnPendingCardRemoved event) + CardSystemManager.Instance.RemoveFromPending(match); + Logging.Debug($"[AlbumViewPage] Removed '{match.Name}' from pending cards, starting reveal flow"); + + // Rebuild corner cards AFTER removing from pending list + // This ensures the removed card doesn't get re-spawned + RebuildCornerCards(); + } + + return match; + } + /// - /// Find the AlbumCardSlot that accepts this card based on DefinitionId + /// Query method: Get target slot for a card. + /// Called by PendingFaceDownState to find where card should go. /// - private AlbumCardSlot FindTargetSlotForCard(CardData cardData) + public AlbumCardSlot GetTargetSlotForCard(CardData cardData) { if (cardData == null) return null; @@ -695,7 +735,6 @@ namespace UI.CardSystem if (slot.TargetCardDefinition != null && slot.TargetCardDefinition.Id == cardData.DefinitionId) { - Logging.Debug($"[AlbumViewPage] Found target slot for {cardData.DefinitionId}, slot: {slot}"); return slot; } } @@ -703,98 +742,80 @@ namespace UI.CardSystem return null; } - private void PlaceCardInSlot(StateMachine.Card card, AlbumCardSlot slot) + /// + /// Service method: Navigate to the page for a specific card. + /// Called by PendingFaceDownState to flip book to correct zone page. + /// + public void NavigateToCardPage(CardData cardData, System.Action onComplete) { - if (card == null || slot == null) return; + if (cardData == null || book == null) + { + onComplete?.Invoke(); + return; + } - Logging.Debug($"[AlbumViewPage] Placing card '{card.CardData?.Name}' in slot - starting tween"); + // Find target page based on card's zone + int targetPage = FindPageForZone(cardData.Zone); - // Reparent to slot immediately, keeping world position (card stays visible where it is) - card.transform.SetParent(slot.transform, true); + if (targetPage < 0) + { + Logging.Warning($"[AlbumViewPage] No page found for zone {cardData.Zone}"); + onComplete?.Invoke(); + return; + } - // Tween local position and scale simultaneously - float tweenDuration = 0.4f; + // Mark as flipping + _isPageFlipping = true; + Logging.Debug($"[AlbumViewPage] Starting page flip to page {targetPage}"); - // Tween position to center of slot - Tween.LocalPosition(card.transform, Vector3.zero, tweenDuration, 0f, Tween.EaseOutBack); + // Get or add AutoFlip component + BookCurlPro.AutoFlip autoFlip = book.GetComponent(); + if (autoFlip == null) + { + autoFlip = book.gameObject.AddComponent(); + } - // Tween scale to normal (same duration and easing) - Tween.LocalScale(card.transform, Vector3.one, tweenDuration, 0f, Tween.EaseOutBack); - - // Tween rotation to identity (use this for the completion callback since all tweens are synchronized) - Tween.LocalRotation(card.transform, Quaternion.identity, tweenDuration, 0f, Tween.EaseOutBack, - completeCallback: () => + // Start flipping with callback + autoFlip.enabled = true; + autoFlip.StartFlipping(targetPage, () => + { + // Mark as complete + _isPageFlipping = false; + Logging.Debug($"[AlbumViewPage] Page flip to {targetPage} completed"); + + // Call original callback if provided + onComplete?.Invoke(); + }); + } + + /// + /// Notify that a card has been placed (for cleanup). + /// Called by PlacedInSlotState after placement is complete. + /// + public void NotifyCardPlaced(StateMachine.Card card) + { + if (card != null) + { + // Remove from tracking list + _pendingCornerCards.Remove(card); + + // IMPORTANT: Unsubscribe from drag events + // Placed cards should never respond to AlbumViewPage drag events + if (card.Context != null) { - // After tween completes, finalize - card.transform.localPosition = Vector3.zero; - card.transform.localRotation = Quaternion.identity; - - // Resize to match slot - RectTransform cardRect = card.transform as RectTransform; - RectTransform slotRect = slot.transform as RectTransform; - if (cardRect != null && slotRect != null) - { - float targetHeight = slotRect.rect.height; - cardRect.sizeDelta = new Vector2(cardRect.sizeDelta.x, targetHeight); - } - - // Transition to placed state - var placedState = card.GetStateComponent("PlacedInSlotState"); - if (placedState != null) - { - placedState.SetParentSlot(slot); - } - card.ChangeState("PlacedInSlotState"); - - // Assign card to slot (so slot remembers it has a card) - slot.AssignCard(card); - - // Mark as placed in inventory - if (CardSystemManager.Instance != null) - { - CardSystemManager.Instance.MarkCardAsPlaced(card.CardData); - } - - // Unsubscribe from drag events - card is now placed, shouldn't respond to future drags - if (card.Context != null) - { - card.Context.OnDragStarted -= OnCardDragStarted; - card.Context.OnDragEnded -= OnCardDragEnded; - } - - // Remove from pending corner cards list - _pendingCornerCards.Remove(card); - - // Register with album page for enlarge system - RegisterCardInAlbum(card); - - Logging.Debug($"[AlbumViewPage] Card placement complete and unsubscribed from drag events"); - - // Reset state for next card - ResetPlacementState(); - }); + card.Context.OnDragStarted -= OnCardDragStarted; + } + + // Register for enlarge/shrink functionality + RegisterCardInAlbum(card); + + Logging.Debug($"[AlbumViewPage] Card placed and unsubscribed from corner events: {card.CardData?.Name}"); + } } - private void ResetPlacementState() - { - _pendingPlacementCard = null; - _waitingForPageFlip = false; - _cardDragReleased = false; - } + #endregion - private CardData SelectSmartPendingCard() - { - if (CardSystemManager.Instance == null) return null; - var pending = CardSystemManager.Instance.GetPendingRevealCards(); - if (pending.Count == 0) return null; - // Try current page match - var pageDefs = GetDefinitionsOnCurrentPage(); - var match = pending.Find(c => pageDefs.Contains(c.DefinitionId)); - if (match != null) return match; - // Fallback random - int idx = Random.Range(0, pending.Count); - return pending[idx]; - } + #region Helper Methods /// /// Find the target page for a card zone using BookTabButtons @@ -864,29 +885,6 @@ namespace UI.CardSystem return false; } - private void NavigateToAlbumPage(int pageIndex, UnityEngine.Events.UnityAction onComplete = null) - { - if (book == null || pageIndex < 0) return; - - // Get or add AutoFlip component - BookCurlPro.AutoFlip autoFlip = book.GetComponent(); - if (autoFlip == null) - { - autoFlip = book.gameObject.AddComponent(); - } - - // Start flipping to target page with callback - autoFlip.enabled = true; - if (onComplete != null) - { - autoFlip.StartFlipping(pageIndex, onComplete); - } - else - { - autoFlip.StartFlipping(pageIndex); - } - } - #endregion } } diff --git a/Assets/Scripts/UI/CardSystem/DragDrop/BoosterPackDraggable.cs b/Assets/Scripts/UI/CardSystem/DragDrop/BoosterPackDraggable.cs index bf6527ab..74590eaa 100644 --- a/Assets/Scripts/UI/CardSystem/DragDrop/BoosterPackDraggable.cs +++ b/Assets/Scripts/UI/CardSystem/DragDrop/BoosterPackDraggable.cs @@ -88,11 +88,44 @@ namespace UI.CardSystem.DragDrop { base.OnDragEndedHook(); - // Optionally trigger open when dropped in specific zones - if (canOpenOnDrop) + // Find closest slot and assign to it (replaces removed auto-slotting from base class) + SlotContainer[] containers = FindObjectsByType(FindObjectsSortMode.None); + DraggableSlot closestSlot = null; + float closestDistance = float.MaxValue; + + // Get position (handle both overlay and world space canvas) + Vector3 myPosition = (RectTransform != null && + GetComponentInParent()?.renderMode == RenderMode.ScreenSpaceOverlay) + ? RectTransform.position + : transform.position; + + // Find closest slot among all containers + foreach (var container in containers) { - // Could check if dropped in an "opening zone" - // For now, just a placeholder + DraggableSlot slot = container.FindClosestSlot(myPosition, this); + if (slot != null) + { + Vector3 slotPosition = slot.RectTransform != null ? slot.RectTransform.position : slot.transform.position; + float distance = Vector3.Distance(myPosition, slotPosition); + if (distance < closestDistance) + { + closestDistance = distance; + closestSlot = slot; + } + } + } + + // Assign to closest slot if found + if (closestSlot != null) + { + Logging.Debug($"[BoosterPackDraggable] Drag ended, assigning to closest slot: {closestSlot.name}"); + AssignToSlot(closestSlot, true); + } + else if (CurrentSlot != null) + { + // No valid slot found, return to current slot + Logging.Debug($"[BoosterPackDraggable] No valid slot found, snapping back to current slot"); + AssignToSlot(CurrentSlot, true); } } diff --git a/Assets/Scripts/UI/CardSystem/StateMachine/Card.cs b/Assets/Scripts/UI/CardSystem/StateMachine/Card.cs index 719a1be5..39e8606f 100644 --- a/Assets/Scripts/UI/CardSystem/StateMachine/Card.cs +++ b/Assets/Scripts/UI/CardSystem/StateMachine/Card.cs @@ -66,8 +66,8 @@ namespace UI.CardSystem.StateMachine } // Default behavior: transition to DraggingState - Logging.Debug($"[Card] Drag started on {CardData?.Name}, transitioning to DraggingState"); - ChangeState("DraggingState"); + // Logging.Debug($"[Card] Drag started on {CardData?.Name}, transitioning to DraggingState"); + // ChangeState("DraggingState"); } protected override void OnDragEndedHook() diff --git a/Assets/Scripts/UI/CardSystem/StateMachine/CardContext.cs b/Assets/Scripts/UI/CardSystem/StateMachine/CardContext.cs index 262d5ad0..b4851dfe 100644 --- a/Assets/Scripts/UI/CardSystem/StateMachine/CardContext.cs +++ b/Assets/Scripts/UI/CardSystem/StateMachine/CardContext.cs @@ -1,4 +1,4 @@ -using System; +using System; using AppleHills.Data.CardSystem; using Core.SaveLoad; using UnityEngine; @@ -19,6 +19,9 @@ namespace UI.CardSystem.StateMachine [Header("Card Data")] private CardData cardData; + // Cached reference to AlbumViewPage (lazy-loaded) + private AlbumViewPage _albumViewPage; + // Public accessors public CardDisplay CardDisplay => cardDisplay; public CardAnimator Animator => cardAnimator; @@ -26,8 +29,25 @@ namespace UI.CardSystem.StateMachine public Transform RootTransform => transform; public CardData CardData => cardData; + /// + /// Get the AlbumViewPage instance (cached to avoid repeated FindFirstObjectByType calls) + /// + public AlbumViewPage AlbumViewPage + { + get + { + if (_albumViewPage == null) + { + _albumViewPage = FindFirstObjectByType(); + } + return _albumViewPage; + } + } + // Runtime state public bool IsClickable { get; set; } = true; + + // TODO: Move to booster-specific states - this is workflow-specific, not generic context public bool SuppressRevealBadges { get; set; } = false; // Set by states to suppress NEW/REPEAT badges in revealed state // Original transform data (captured on spawn for shrink animations) @@ -35,6 +55,7 @@ namespace UI.CardSystem.StateMachine public Vector3 OriginalPosition { get; private set; } public Quaternion OriginalRotation { get; private set; } + // TODO: Move to BoosterOpeningPage - reveal flow is booster-specific workflow coordination // Single event for reveal flow completion public event Action OnRevealFlowComplete; @@ -44,9 +65,11 @@ namespace UI.CardSystem.StateMachine // Generic drag end event - fired when drag ends, consumers decide how to handle based on current state public event Action OnDragEnded; + // TODO: Move to booster-specific states - this tracks reveal workflow completion private bool _hasCompletedReveal = false; public bool HasCompletedReveal => _hasCompletedReveal; + // TODO: Move to booster-specific states - workflow coordination method // Helper method for states to signal completion public void NotifyRevealComplete() { diff --git a/Assets/Scripts/UI/CardSystem/StateMachine/States/CardDraggingRevealedState.cs b/Assets/Scripts/UI/CardSystem/StateMachine/States/CardDraggingRevealedState.cs index 239d7ae8..1eaf8802 100644 --- a/Assets/Scripts/UI/CardSystem/StateMachine/States/CardDraggingRevealedState.cs +++ b/Assets/Scripts/UI/CardSystem/StateMachine/States/CardDraggingRevealedState.cs @@ -1,22 +1,46 @@ -using Core.SaveLoad; +using Core; +using Core.SaveLoad; using UnityEngine; namespace UI.CardSystem.StateMachine.States { /// /// Dragging revealed state for pending cards after flip. - /// Shows card front without badges, handles placement or return to corner. + /// Shows card front without badges, handles transition to placement after drag release. + /// Queries AlbumViewPage for page flip status instead of tracking state internally. /// public class CardDraggingRevealedState : AppleState, ICardStateDragHandler { private CardContext _context; private Vector3 _originalScale; + // Placement info passed from PendingFaceDownState + private AlbumCardSlot _targetSlot; + private bool _dragAlreadyEnded = false; // Track if drag ended before we entered this state (instant-release case) + private void Awake() { _context = GetComponentInParent(); } + /// + /// Set target slot from previous state + /// Called by PendingFaceDownState before transition + /// + public void SetTargetSlot(AlbumCardSlot targetSlot) + { + _targetSlot = targetSlot; + } + + /// + /// Set flag indicating drag already ended before entering this state + /// Called by PendingFaceDownState for instant-release case + /// + public void SetDragAlreadyEnded(bool ended) + { + _dragAlreadyEnded = ended; + } + public override void OnEnterState() { if (_context == null) return; @@ -27,6 +51,14 @@ namespace UI.CardSystem.StateMachine.States } _originalScale = _context.RootTransform.localScale; _context.RootTransform.localScale = _originalScale * 1.15f; + + // Check if drag already ended before we entered this state (instant-release case) + if (_dragAlreadyEnded) + { + Logging.Debug("[CardDraggingRevealedState] Drag ended before state entry - handling placement immediately"); + _dragAlreadyEnded = false; // Clear flag + HandlePlacement(); + } } /// @@ -38,21 +70,94 @@ namespace UI.CardSystem.StateMachine.States } /// - /// Handle drag end - just let AlbumViewPage handle placement logic - /// Stay in this state until AlbumViewPage transitions us after tween + /// Handle drag end - query AlbumViewPage for page flip status and place accordingly /// public bool OnCardDragEnded(CardContext ctx) { - // Don't do anything - AlbumViewPage will: - // 1. Wait for page flip to complete - // 2. Find the correct slot - // 3. Tween card to slot - // 4. Transition to PlacedInSlotState - - // Return true to prevent default behavior + HandlePlacement(); return true; } + /// + /// Handle card placement logic - called from OnCardDragEnded or OnEnterState (instant-release) + /// + private void HandlePlacement() + { + if (_targetSlot == null) + { + Logging.Warning("[CardDraggingRevealedState] No target slot set - cannot place card"); + // Return to corner + _context.StateMachine.ChangeState("PendingFaceDownState"); + return; + } + + // Query AlbumViewPage for page flip status + var albumPage = _context.AlbumViewPage; + if (albumPage == null) + { + Logging.Warning("[CardDraggingRevealedState] AlbumViewPage not found - placing immediately"); + TransitionToPlacement(_context); + return; + } + + // Check if page is still flipping + if (albumPage.IsPageFlipping) + { + // Wait for flip to complete + Logging.Debug("[CardDraggingRevealedState] Page still flipping - waiting before placement"); + StartCoroutine(WaitForPageFlipThenPlace(_context, albumPage)); + } + else + { + // Flip already done - place immediately + Logging.Debug("[CardDraggingRevealedState] Page flip complete - placing card immediately"); + TransitionToPlacement(_context); + } + } + + private System.Collections.IEnumerator WaitForPageFlipThenPlace(CardContext ctx, AlbumViewPage albumPage) + { + // Wait until page flip completes (max 0.5 seconds timeout) + float timeout = 0.5f; + float elapsed = 0f; + + while (albumPage.IsPageFlipping && elapsed < timeout) + { + yield return null; + elapsed += Time.deltaTime; + } + + if (elapsed >= timeout) + { + Logging.Warning("[CardDraggingRevealedState] Page flip wait timed out"); + } + else + { + Logging.Debug("[CardDraggingRevealedState] Page flip completed, placing card"); + } + + // Now place the card + TransitionToPlacement(ctx); + } + + private void TransitionToPlacement(CardContext ctx) + { + // Pass target slot to PlacedInSlotState + var card = ctx.GetComponent(); + if (card != null) + { + var placedState = card.GetStateComponent("PlacedInSlotState"); + if (placedState != null) + { + placedState.SetPlacementInfo(_targetSlot); + } + } + + // Transition to PlacedInSlotState + // The state will handle animation and finalization in OnEnterState + ctx.StateMachine.ChangeState("PlacedInSlotState"); + } + private void OnDisable() { if (_context?.RootTransform != null) diff --git a/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPendingFaceDownState.cs b/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPendingFaceDownState.cs index e8d5e6c5..2e930ebd 100644 --- a/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPendingFaceDownState.cs +++ b/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPendingFaceDownState.cs @@ -6,7 +6,8 @@ namespace UI.CardSystem.StateMachine.States { /// /// Card is in pending face-down state in corner, awaiting drag. - /// On drag start, triggers flip animation and transitions to revealed dragging. + /// On drag start, queries AlbumViewPage for card data and slot, triggers page navigation, + /// then flips and transitions to dragging revealed state. /// public class CardPendingFaceDownState : AppleState, ICardStateDragHandler { @@ -15,6 +16,8 @@ namespace UI.CardSystem.StateMachine.States private CardContext _context; private bool _isFlipping; + private AlbumCardSlot _targetSlot; + private bool _dragEndedDuringFlip = false; // Track if user released before card flip animation completed private void Awake() { @@ -26,6 +29,8 @@ namespace UI.CardSystem.StateMachine.States if (_context == null) return; _isFlipping = false; + _targetSlot = null; + _dragEndedDuringFlip = false; // Show card back, hide card front if (cardBackVisual != null) @@ -39,37 +44,67 @@ namespace UI.CardSystem.StateMachine.States _context.CardDisplay.gameObject.SetActive(false); _context.CardDisplay.transform.localRotation = Quaternion.Euler(0, 180, 0); } - - // Scale down for corner display - _context.RootTransform.localScale = _context.OriginalScale * 0.8f; } /// - /// Handle drag start - triggers flip animation and page navigation + /// Handle drag start - STATE ORCHESTRATES ITS OWN FLOW /// public bool OnCardDragStarted(CardContext context) { if (_isFlipping) return true; // Already handling - // IMPORTANT: Data must be assigned by event listeners (AlbumViewPage) BEFORE we flip - // The event system guarantees this because events are synchronous - if (context.CardData == null) + // Step 1: Find AlbumViewPage + AlbumViewPage albumPage = Object.FindFirstObjectByType(); + if (albumPage == null) { - Logging.Warning("[CardPendingFaceDownState] OnCardDragStarted called but no CardData assigned yet!"); - return true; // Don't flip without data + Logging.Warning("[CardPendingFaceDownState] AlbumViewPage not found!"); + return true; } - - // Start flip animation (data is now guaranteed to be assigned) + + // Step 2: Ask AlbumViewPage what card to display and prompt it to rebuild + var cardData = albumPage.GetCardForPendingSlot(); + if (cardData == null) + { + Logging.Warning("[CardPendingFaceDownState] No card data available from AlbumViewPage!"); + return true; + } + + // Step 3: Apply card data to context + context.SetupCard(cardData); + Logging.Debug($"[CardPendingFaceDownState] Assigned card data: {cardData.Name} ({cardData.Zone})"); + + // Step 4: Ask AlbumViewPage for target slot + _targetSlot = albumPage.GetTargetSlotForCard(cardData); + if (_targetSlot == null) + { + Logging.Warning($"[CardPendingFaceDownState] No slot found for card {cardData.DefinitionId}"); + // Still flip and show card, but won't be able to place it + } + + // Step 5: Request page navigation (no callback needed - AlbumViewPage tracks state) + albumPage.NavigateToCardPage(cardData, null); + + // Step 6: Start card flip animation StartFlipAnimation(); + return true; // We handled it, prevent default DraggingState transition } + /// - /// We don't handle drag end in face-down state + /// Handle drag end - if card flip animation still in progress, flag it for next state /// public bool OnCardDragEnded(CardContext context) { - return false; + if (_isFlipping) + { + // Card flip animation still in progress - user released immediately + _dragEndedDuringFlip = true; + Logging.Debug("[CardPendingFaceDownState] Drag ended during card flip - will pass to next state"); + return true; // We handled it + } + + return false; // Already transitioned to DraggingRevealedState, let it handle } private void StartFlipAnimation() @@ -103,6 +138,24 @@ namespace UI.CardSystem.StateMachine.States private void OnFlipComplete() { // Transition to dragging revealed state + // Pass target slot to next state (it will query AlbumViewPage for flip status) + var card = _context.GetComponent(); + if (card != null) + { + var draggingState = card.GetStateComponent("DraggingRevealedState"); + if (draggingState != null) + { + draggingState.SetTargetSlot(_targetSlot); + + // If drag ended before we transitioned, tell next state to handle placement immediately + if (_dragEndedDuringFlip) + { + draggingState.SetDragAlreadyEnded(true); + Logging.Debug("[CardPendingFaceDownState] Passing drag-ended flag to DraggingRevealedState"); + } + } + } + _context.StateMachine.ChangeState("DraggingRevealedState"); } diff --git a/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPlacedInSlotState.cs b/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPlacedInSlotState.cs index de9f331d..bd8fded5 100644 --- a/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPlacedInSlotState.cs +++ b/Assets/Scripts/UI/CardSystem/StateMachine/States/CardPlacedInSlotState.cs @@ -1,41 +1,130 @@ -using Core; +using Core; using Core.SaveLoad; +using Data.CardSystem; using UnityEngine; namespace UI.CardSystem.StateMachine.States { /// - /// Placed in slot state - card is in an album slot and can be clicked to enlarge. - /// Manages the parent slot reference. + /// Placed in slot state - card is being/has been placed in an album slot. + /// SMART STATE: Handles snap-to-slot animation on entry, then finalizes placement. /// public class CardPlacedInSlotState : AppleState, ICardClickHandler { private CardContext _context; private AlbumCardSlot _parentSlot; + private AlbumCardSlot _targetSlotForAnimation; // Set by DraggingRevealedState for animated placement private void Awake() { _context = GetComponentInParent(); } + /// + /// Set placement info from previous state (for animated placement from drag) + /// + public void SetPlacementInfo(AlbumCardSlot targetSlot) + { + _targetSlotForAnimation = targetSlot; + } + public override void OnEnterState() { // Ensure card front is visible and facing camera - // This is important when spawning cards directly into album (skipping booster flow) if (_context.CardDisplay != null) { _context.CardDisplay.gameObject.SetActive(true); _context.CardDisplay.transform.localRotation = Quaternion.Euler(0, 0, 0); } - Logging.Debug($"[CardPlacedInSlotState] Card placed in slot: {_context.CardData?.Name}"); - - // Card is now part of the album, no special visuals needed - // Just wait for interaction + // Check if this is animated placement (from drag) or direct placement (from spawn) + if (_targetSlotForAnimation != null) + { + // Animated placement - play tween to slot + Logging.Debug($"[CardPlacedInSlotState] Animating card '{_context.CardData?.Name}' to slot"); + AnimateToSlot(_targetSlotForAnimation); + } + else + { + // Direct placement (spawned in slot) - already positioned correctly + // Disable dragging for spawned cards too + var card = _context.GetComponent(); + if (card != null) + { + card.SetDraggingEnabled(false); + } + Logging.Debug($"[CardPlacedInSlotState] Card '{_context.CardData?.Name}' directly placed in slot"); + } } /// - /// Set the parent slot this card belongs to + /// Animate card to slot position and finalize placement + /// + private void AnimateToSlot(AlbumCardSlot slot) + { + var card = _context.GetComponent(); + if (card == null) return; + + // Reparent to slot immediately, keeping world position + card.transform.SetParent(slot.transform, true); + + // Tween position, scale, rotation simultaneously + float tweenDuration = 0.4f; + + Pixelplacement.Tween.LocalPosition(card.transform, Vector3.zero, tweenDuration, 0f, Pixelplacement.Tween.EaseOutBack); + Pixelplacement.Tween.LocalScale(card.transform, Vector3.one, tweenDuration, 0f, Pixelplacement.Tween.EaseOutBack); + Pixelplacement.Tween.LocalRotation(card.transform, Quaternion.identity, tweenDuration, 0f, Pixelplacement.Tween.EaseOutBack, + completeCallback: () => FinalizePlacement(card, slot)); + } + + /// + /// Finalize placement after animation completes + /// + private void FinalizePlacement(Card card, AlbumCardSlot slot) + { + // Ensure final position/rotation + card.transform.localPosition = Vector3.zero; + card.transform.localRotation = Quaternion.identity; + + // Resize to match slot + RectTransform cardRect = card.transform as RectTransform; + RectTransform slotRect = slot.transform as RectTransform; + if (cardRect != null && slotRect != null) + { + float targetHeight = slotRect.rect.height; + cardRect.sizeDelta = new Vector2(cardRect.sizeDelta.x, targetHeight); + } + + // Set parent slot + _parentSlot = slot; + + // Disable dragging - cards in slots should only respond to clicks for enlargement + card.SetDraggingEnabled(false); + + // Notify slot + slot.AssignCard(card); + + // Mark as placed in inventory + if (CardSystemManager.Instance != null) + { + CardSystemManager.Instance.MarkCardAsPlaced(card.CardData); + } + + // Notify AlbumViewPage for registration + var albumPage = Object.FindFirstObjectByType(); + if (albumPage != null) + { + albumPage.NotifyCardPlaced(card); + } + + Logging.Debug($"[CardPlacedInSlotState] Card placement finalized: {card.CardData?.Name}"); + + // Clear animation target + _targetSlotForAnimation = null; + } + + /// + /// Set the parent slot this card belongs to (for direct placement without animation) /// public void SetParentSlot(AlbumCardSlot slot) { diff --git a/Assets/Scripts/UI/DragAndDrop/Core/DraggableObject.cs b/Assets/Scripts/UI/DragAndDrop/Core/DraggableObject.cs index d762c7a0..57592e8b 100644 --- a/Assets/Scripts/UI/DragAndDrop/Core/DraggableObject.cs +++ b/Assets/Scripts/UI/DragAndDrop/Core/DraggableObject.cs @@ -243,6 +243,10 @@ namespace UI.DragAndDrop.Core public virtual void OnDrag(PointerEventData eventData) { + // Just ship all this shit when disabled + if (!_isDraggingEnabled) + return; + if (!_isDragging) return; @@ -269,6 +273,9 @@ namespace UI.DragAndDrop.Core public virtual void OnEndDrag(PointerEventData eventData) { + if (!_isDraggingEnabled) + return; + if (!_isDragging) return; @@ -282,14 +289,7 @@ namespace UI.DragAndDrop.Core if (_canvasGroup != null) _canvasGroup.blocksRaycasts = true; - // Find closest slot and snap - FindAndSnapToSlot(); - - // Snap base rotation back to slot rotation (if in a slot) - if (_currentSlot != null) - { - Tween.Rotation(transform, _currentSlot.transform.rotation, 0.3f, 0f, Tween.EaseOutBack); - } + // No auto-slotting - derived classes handle placement logic via OnDragEndedHook() OnDragEnded?.Invoke(this); OnDragEndedHook(); @@ -344,70 +344,8 @@ namespace UI.DragAndDrop.Core #region Slot Management - protected virtual void FindAndSnapToSlot() - { - SlotContainer[] containers = FindObjectsByType(FindObjectsSortMode.None); - DraggableSlot closestSlot = null; - float closestDistance = float.MaxValue; - - // Use RectTransform.position for overlay, transform.position for others - Vector3 myPosition = (_canvas != null && _canvas.renderMode == RenderMode.ScreenSpaceOverlay && RectTransform != null) - ? RectTransform.position - : transform.position; - - foreach (var container in containers) - { - DraggableSlot slot = container.FindClosestSlot(myPosition, this); - if (slot != null) - { - Vector3 slotPosition = slot.RectTransform != null ? slot.RectTransform.position : slot.transform.position; - float distance = Vector3.Distance(myPosition, slotPosition); - if (distance < closestDistance) - { - closestDistance = distance; - closestSlot = slot; - } - } - } - - if (closestSlot != null) - { - // Check if slot is occupied - if (closestSlot.IsOccupied && closestSlot.Occupant != this) - { - // Swap with occupant - SwapWithSlot(closestSlot); - } - else - { - // Move to empty slot - AssignToSlot(closestSlot, true); - } - } - else if (_currentSlot != null) - { - // Return to current slot if no valid slot found - SnapToCurrentSlot(); - } - } - - protected virtual void SwapWithSlot(DraggableSlot targetSlot) - { - DraggableSlot mySlot = _currentSlot; - DraggableObject otherObject = targetSlot.Occupant; - - if (otherObject != null) - { - // Both objects swap slots - targetSlot.Vacate(); - if (mySlot != null) - mySlot.Vacate(); - - AssignToSlot(targetSlot, true); - if (mySlot != null) - otherObject.AssignToSlot(mySlot, true); - } - } + // Auto-slotting removed - derived classes (Card, etc.) handle placement via state machines + // AssignToSlot() and SnapToSlot() kept for explicit slot assignment public virtual void AssignToSlot(DraggableSlot slot, bool animate) { @@ -461,14 +399,6 @@ namespace UI.DragAndDrop.Core } } - protected virtual void SnapToCurrentSlot() - { - if (_currentSlot != null) - { - SnapToSlot(_currentSlot); - } - } - #endregion #region Selection