Commit Graph

23 Commits

Author SHA1 Message Date
Michal Pikulski
a4363fecb3 Stash work on refactor of trajecotry 2025-12-07 20:34:43 +01:00
83aa3d5e6d Implement MVP for the statue decoration minigame (#65)
MVP implemented with:
- placing, removing etc. decorations
- saving the state, displaying it on the map, restoring when game restarts
- saving screenshots to folder on device

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #65
2025-11-27 13:21:22 +00:00
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
Michal Pikulski
612ca7eae8 Interactables documentaiton 2025-11-11 15:55:38 +01:00
acf46c701e Last life cycle refactor updates + add comprehensive documentation (#57)
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #57
2025-11-11 12:32:36 +00:00
0aa2270e1a Lifecycle System Refactor & Logging Centralization (#56)
## ManagedBehaviour System Refactor

- **Sealed `Awake()`** to prevent override mistakes that break singleton registration
- **Added `OnManagedAwake()`** for early initialization (fires during registration)
- **Renamed lifecycle hook:** `OnManagedAwake()` → `OnManagedStart()` (fires after boot, mirrors Unity's Awake→Start)
- **40 files migrated** to new pattern (2 core, 38 components)
- Eliminated all fragile `private new void Awake()` patterns
- Zero breaking changes - backward compatible

## Centralized Logging System

- **Automatic tagging** via `CallerMemberName` and `CallerFilePath` - logs auto-tagged as `[ClassName][MethodName] message`
- **Unified API:** Single `Logging.Debug/Info/Warning/Error()` replaces custom `LogDebugMessage()` implementations
- **~90 logging call sites** migrated across 10 files
- **10 redundant helper methods** removed
- All logs broadcast via `Logging.OnLogEntryAdded` event for real-time monitoring

## Custom Log Console (Editor Window)

- **Persistent filter popups** for multi-selection (classes, methods, log levels) - windows stay open during selection
- **Search** across class names, methods, and message content
- **Time range filter** with MinMaxSlider
- **Export** filtered logs to timestamped `.txt` files
- **Right-click context menu** for quick filtering and copy actions
- **Visual improvements:** White text, alternating row backgrounds, color-coded log levels
- **Multiple instances** supported for simultaneous system monitoring
- Open via `AppleHills > Custom Log Console`

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #56
2025-11-11 08:48:29 +00:00
Michal Pikulski
7862af7f8b Cleanup 2025-11-06 15:33:30 +01:00
Michal Pikulski
4e0c9cb4c4 Working visual part 2025-11-06 15:27:08 +01:00
Michal Pikulski
95daea8d34 Code up the card part 2025-11-06 15:27:08 +01:00
journaliciouz
e81879959e Properly queue critical VO clips 2025-10-30 14:17:47 +01:00
Michal Adam Pikulski
c71836c029 Stash WIP of settings documentation 2025-10-21 15:08:48 +02:00
Michal Adam Pikulski
2abcf5c76a Cleanup the editor assembly and provide a tool overview doc 2025-10-21 14:54:58 +02:00
Michal Adam Pikulski
9b6dc0f616 Add a playbook for using the boostrap system 2025-10-21 14:20:09 +02:00
Michal Adam Pikulski
7096dffb54 Update readme docs for our systems 2025-10-21 12:37:57 +02:00
Michal Adam Pikulski
2fb77e1040 Cleanup the card implementation, add some readme files and update namespaces 2025-10-21 12:10:16 +02:00
Michal Adam Pikulski
83b5c8994d Kind of working booster packs 2025-10-20 16:33:58 +02:00
Michal Adam Pikulski
542dd9a4b7 First draft of the consolidated card system 2025-10-20 16:33:58 +02:00
Michal Pikulski
6c23d1bcfa Add implementation plan and main UI for the card system 2025-10-20 16:33:58 +02:00
Michal Pikulski
ed9f2d6c6d First go at the card UI 2025-10-20 16:33:58 +02:00
Michal Pikulski
18be597424 Add card inventory classes and helpers 2025-10-14 15:54:11 +02:00
2573e7f80e Add a system for setting up "real" camera framing to work between devices (#26)
- In-level authoring utility to designate level bounds
- Camera Adapter component to be placed on a level's camera to perform the adjustments
- EdgeAnchor tool, which allows anchoring of game objects to the screen bounds

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Reviewed-on: #26
2025-10-14 04:56:00 +00:00
Michal Pikulski
81a6becd44 Implement Debug settings and provide an overview of the settings madness 2025-10-10 15:47:38 +02:00
10992b43cc Unity Timeline Interaction System Integration (#17)
- Added InteractionTimelineAction component for timeline-driven interactions
- Implemented custom editor for timeline event mapping
- Updated interaction event flow to support timeline actions
- Enhanced character move target configuration
- Improved inspector UI for interactable components
- Added technical documentation for interaction system
- Refactored interaction action base classes for extensibility
- Fixed issues with character binding in timelines

Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com>
Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #17
2025-10-07 10:57:11 +00:00