Commit Graph

9 Commits

Author SHA1 Message Date
235fa04eba Merge a card refresh (#59)
- **Refactored Card Placement Flow**
  - Separated card presentation from orchestration logic
  - Extracted `CornerCardManager` for pending card lifecycle (spawn, shuffle, rebuild)
  - Extracted `AlbumNavigationService` for book page navigation and zone mapping
  - Extracted `CardEnlargeController` for backdrop management and card reparenting
  - Implemented controller pattern (non-MonoBehaviour) for complex logic
  - Cards now unparent from slots before rebuild to prevent premature destruction

- **Improved Corner Card Display**
  - Fixed cards spawning on top of each other during rebuild
  - Implemented shuffle-to-front logic (remaining cards occupy slots 0→1→2)
  - Added smart card selection (prioritizes cards matching current album page)
  - Pending cards now removed from queue immediately on drag start
  - Corner cards rebuild after each placement with proper slot reassignment

- **Enhanced Album Card Viewing**
  - Added dramatic scale increase when viewing cards from album slots
  - Implemented shrink animation when dismissing enlarged cards
  - Cards transition: `PlacedInSlotState` → `AlbumEnlargedState` → `PlacedInSlotState`
  - Backdrop shows/hides with card enlarge/shrink cycle
  - Cards reparent to enlarged container while viewing, return to slot after

- **State Machine Improvements**
  - Added `CardStateNames` constants for type-safe state transitions
  - Implemented `ICardClickHandler` and `ICardStateDragHandler` interfaces
  - State transitions now use cached property indices
  - `BoosterCardContext` separated from `CardContext` for single responsibility

- **Code Cleanup**
  - Identified unused `SlotContainerHelper.cs` (superseded by `CornerCardManager`)
  - Identified unused `BoosterPackDraggable.canOpenOnDrop` field
  - Identified unused `AlbumViewPage._previousInputMode` (hardcoded value)
  - Identified unused `Card.OnPlacedInAlbumSlot` event (no subscribers)

Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #59
2025-11-18 08:40:59 +00:00
32601e5ef8 Card Data Update 2025-11-07 15:54:25 +01:00
5c4b8825ee Card Creation 2025-11-07 13:57:36 +01:00
Michal Pikulski
d23c000347 Working flipping cards 2025-11-06 23:17:55 +01:00
Michal Pikulski
50c0a12391 New card UI, new visual config, new card definitions, new working editor window for authoring! 2025-11-05 23:50:15 +01:00
DamianCorazza
14d1b8316e Added New Textures for Cards And Configure basic Card Variations 2025-10-21 14:53:59 +02:00
Michal Adam Pikulski
af77e07f99 Update the cards to pull in from addressables to wokr in build, remove erronous code preventing building 2025-10-21 10:29:06 +02:00
Michal Adam Pikulski
3e833b8991 Working card system 2025-10-20 16:33:58 +02:00
Michal Pikulski
0c5546efd2 Add backbone for card creation and implement Camera minigame mechanics 2025-10-10 14:49:42 +02:00