How ycarowr/uicard works
Main System Components
The system should be represented as a layered architecture with the following main components:
a) UI Layer
• Card Prefabs and Visual Components
• Drop Zones (Hand and Battlefield)
• Player Hands (P1 and P2)
• Card Motion System
b) Core Systems
• State Machine
• Pooling System
• Event System
• Input Handler
Detailed Component Breakdown
Card Component System:
UiCardComponent
• Transform System
• Motion
• Rotation
• Scaling
• State Machine
• Idle
• Hover
• Drag
• Discard
• Disable
• Input Handler
Architectural Patterns to Emphasize
• Observer Pattern (DelegateObserver)
• State Pattern (Card States)
• Pooling Pattern (GenericPooler)
• Command Pattern
• Builder Pattern
Specific Implementation Details
Crucial elements:
Card Management
• PrefabPooler
• UiPlayerHand
• HandBender
• HandSorter
• HandUtils
• DropZones
• Battlefield
• Hand
Configuration System
Parameters system:
UiCardParameters
• Spacing
• Rotation
• Height
• Hover Properties
• Motion Speed