Updates to card testing scene
This commit is contained in:
committed by
Michal Pikulski
parent
4e7f774386
commit
755082c67d
291
docs/cards_wip/card_dragdrop_integration_summary.md
Normal file
291
docs/cards_wip/card_dragdrop_integration_summary.md
Normal file
@@ -0,0 +1,291 @@
|
||||
# Card Drag/Drop Integration - Refactor Summary
|
||||
|
||||
## What Was Changed
|
||||
|
||||
### ✅ **Files Modified:**
|
||||
|
||||
1. **Card.cs** - Now inherits from `DraggableObject`
|
||||
- Added drag event hooks (`OnDragStartedHook`, `OnDragEndedHook`)
|
||||
- Added setup methods for different flows (booster, album placement, album slot)
|
||||
- Changed `Awake()` to `Initialize()` to match DraggableObject pattern
|
||||
|
||||
2. **CardDraggingState.cs** - Simplified to visual-only
|
||||
- Removed position update methods (handled by DraggableObject base)
|
||||
- Kept scale animation for visual feedback
|
||||
- Removed redundant methods (`UpdateDragPosition`, `OnDroppedInSlot`, etc.)
|
||||
|
||||
### ✅ **Files Moved to DEPRECATED:**
|
||||
|
||||
- `CardDraggable.cs` → `DEPRECATED/` (redundant wrapper)
|
||||
- `CardDraggableVisual.cs` → `DEPRECATED/` (tied to old system)
|
||||
- `FlippableCard.cs` → `DEPRECATED/` (old card implementation)
|
||||
|
||||
**Note:** AlbumCardPlacementDraggable.cs remains in DragDrop/ for now (used by album corner cards)
|
||||
|
||||
---
|
||||
|
||||
## How It Works Now
|
||||
|
||||
### **Card.cs Inheritance Chain:**
|
||||
```
|
||||
Card → DraggableObject → MonoBehaviour
|
||||
```
|
||||
|
||||
Card now has all DraggableObject capabilities:
|
||||
- ✅ Drag/drop detection (OnBeginDrag, OnDrag, OnEndDrag)
|
||||
- ✅ Slot detection and snapping
|
||||
- ✅ Pointer events (OnPointerEnter, OnPointerExit, etc.)
|
||||
- ✅ Enable/disable dragging via `SetDraggingEnabled(bool)`
|
||||
|
||||
### **Drag Event Flow:**
|
||||
|
||||
```
|
||||
1. Player starts dragging card
|
||||
↓
|
||||
2. DraggableObject.OnBeginDrag() fires
|
||||
↓
|
||||
3. Calls Card.OnDragStartedHook()
|
||||
↓
|
||||
4. Card transitions to DraggingState
|
||||
↓
|
||||
5. DraggingState.OnEnterState() scales card up (visual feedback)
|
||||
↓
|
||||
6. Player drags (DraggableObject handles position updates)
|
||||
↓
|
||||
7. Player releases drag
|
||||
↓
|
||||
8. DraggableObject.OnEndDrag() fires
|
||||
↓
|
||||
9. DraggableObject finds closest slot
|
||||
↓
|
||||
10. Calls Card.OnDragEndedHook()
|
||||
↓
|
||||
11. Card checks if dropped in AlbumCardSlot:
|
||||
- YES → Transition to PlacedInSlotState
|
||||
- NO → Transition to RevealedState
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Setup Methods
|
||||
|
||||
### **For Booster Opening Flow:**
|
||||
```csharp
|
||||
card.SetupForBoosterReveal(cardData, isNew: true);
|
||||
// - Starts in IdleState
|
||||
// - Dragging DISABLED (booster cards can't be dragged)
|
||||
```
|
||||
|
||||
### **For Album Placement Flow:**
|
||||
```csharp
|
||||
card.SetupForAlbumPlacement(cardData);
|
||||
// - Starts in RevealedState
|
||||
// - Dragging ENABLED (can drag to album slots)
|
||||
```
|
||||
|
||||
### **For Cards Already in Album:**
|
||||
```csharp
|
||||
card.SetupForAlbumSlot(cardData, albumSlot);
|
||||
// - Starts in PlacedInSlotState
|
||||
// - Dragging DISABLED (can't drag out of album)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Integration with Existing Drag/Drop System
|
||||
|
||||
### **Works with AlbumCardSlot:**
|
||||
```csharp
|
||||
// AlbumCardSlot.cs doesn't need changes!
|
||||
// It expects DraggableObject, and Card now IS a DraggableObject
|
||||
public class AlbumCardSlot : DraggableSlot
|
||||
{
|
||||
public bool CanAccept(DraggableObject draggable)
|
||||
{
|
||||
// Works with Card because Card inherits from DraggableObject
|
||||
if (draggable is Card card)
|
||||
{
|
||||
return CanAcceptCard(card.CardData);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### **No Visual Component Needed:**
|
||||
- DraggableObject can optionally use a DraggableVisual child
|
||||
- Card doesn't need one - the state machine handles all visuals
|
||||
- Card itself IS the visual representation
|
||||
|
||||
---
|
||||
|
||||
## State Machine Integration
|
||||
|
||||
### **States that interact with drag system:**
|
||||
|
||||
1. **RevealedState** - Card waits here, dragging enabled
|
||||
- Player can click to flip (if corner card)
|
||||
- Player can drag to album slot (if placement card)
|
||||
|
||||
2. **DraggingState** - Visual feedback during drag
|
||||
- Scales card up (1.1x by default)
|
||||
- DraggableObject handles actual drag movement
|
||||
|
||||
3. **PlacedInSlotState** - Card placed in album
|
||||
- Dragging disabled
|
||||
- Can be clicked to enlarge
|
||||
|
||||
---
|
||||
|
||||
## Benefits
|
||||
|
||||
### **Cleaner Architecture:**
|
||||
- ✅ No wrapper scripts needed (Card, CardDraggable, CardDraggableVisual → Just Card)
|
||||
- ✅ Drag capability at top level (Card manages it directly)
|
||||
- ✅ States handle visuals only (DraggingState shows scale, not position)
|
||||
- ✅ Separation of concerns (drag logic ≠ visual logic)
|
||||
|
||||
### **Reuses Generic Base:**
|
||||
- ✅ DraggableObject does all heavy lifting (snapping, slot detection, events)
|
||||
- ✅ No card-specific drag code duplication
|
||||
- ✅ Works with existing SlotContainer, DraggableSlot system
|
||||
|
||||
### **Backward Compatible:**
|
||||
- ✅ Old files moved to DEPRECATED/ (not deleted)
|
||||
- ✅ AlbumCardPlacementDraggable still exists for old corner cards
|
||||
- ✅ Can migrate gradually (new Card works alongside old FlippableCard)
|
||||
|
||||
---
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
### **Booster Opening Flow:**
|
||||
- [ ] Cards spawn in center (not draggable)
|
||||
- [ ] Click card → flips → enlarges
|
||||
- [ ] Tap enlarged card → shrinks to revealed state
|
||||
- [ ] Try dragging card → should be blocked (dragging disabled)
|
||||
|
||||
### **Album Placement Flow:**
|
||||
- [ ] Cards spawn in corner (draggable)
|
||||
- [ ] Click card → flips → shows which card it is
|
||||
- [ ] Card enters RevealedState (draggable)
|
||||
- [ ] Drag card → enters DraggingState (scales up)
|
||||
- [ ] Drop in valid AlbumCardSlot → PlacedInSlotState
|
||||
- [ ] Drop outside slot → returns to RevealedState
|
||||
- [ ] Card in slot is NOT draggable
|
||||
|
||||
### **Album Slot Interaction:**
|
||||
- [ ] Click card in slot → AlbumEnlargedState
|
||||
- [ ] Tap enlarged card → shrinks back to PlacedInSlotState
|
||||
- [ ] Card cannot be dragged out of slot
|
||||
|
||||
---
|
||||
|
||||
## Migration Path for Old Code
|
||||
|
||||
### **Current State:**
|
||||
- ✅ New Card.cs works with drag/drop
|
||||
- ✅ Old FlippableCard.cs in DEPRECATED/ (still compiles)
|
||||
- ✅ Old AlbumCardPlacementDraggable.cs still in DragDrop/ (for corner cards)
|
||||
|
||||
### **Next Steps:**
|
||||
1. Update BoosterOpeningPage to use new Card.SetupForBoosterReveal()
|
||||
2. Update AlbumViewPage corner cards to use Card.SetupForAlbumPlacement()
|
||||
3. Test both flows thoroughly
|
||||
4. Once stable, delete DEPRECATED/ folder
|
||||
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
### **BoosterOpeningPage.cs (New):**
|
||||
```csharp
|
||||
// Spawn booster cards (NOT draggable)
|
||||
Card card = Instantiate(cardPrefab);
|
||||
card.SetupForBoosterReveal(cardData, isNew: isNewCard);
|
||||
card.Context.IsClickable = true;
|
||||
|
||||
// Subscribe to events
|
||||
card.Context.OnFlipComplete += OnCardFlipComplete;
|
||||
card.Context.OnCardInteractionComplete += OnCardComplete;
|
||||
```
|
||||
|
||||
### **AlbumViewPage.cs (New - Corner Cards):**
|
||||
```csharp
|
||||
// Spawn unrevealed corner card (DRAGGABLE)
|
||||
Card card = Instantiate(cardPrefab);
|
||||
card.SetupForAlbumPlacement(cardData);
|
||||
|
||||
// Card can now be dragged to matching album slot
|
||||
// When dropped, automatically transitions to PlacedInSlotState
|
||||
```
|
||||
|
||||
### **AlbumViewPage.cs (New - Already Placed):**
|
||||
```csharp
|
||||
// Card already in album slot (NOT draggable)
|
||||
Card card = Instantiate(cardPrefab, albumSlot.transform);
|
||||
card.SetupForAlbumSlot(cardData, albumSlot);
|
||||
|
||||
// Card can be clicked to enlarge, but not dragged out
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Technical Notes
|
||||
|
||||
### **Why Card inherits from DraggableObject:**
|
||||
- **Single Responsibility:** Card manages its own drag capability
|
||||
- **No Wrappers:** Simpler prefab structure (no CardDraggable wrapper)
|
||||
- **Polymorphism:** AlbumCardSlot accepts DraggableObject, Card IS a DraggableObject
|
||||
- **Event Integration:** DraggableObject events trigger state transitions
|
||||
|
||||
### **Why DraggingState is visual-only:**
|
||||
- **DraggableObject handles movement:** OnDrag() updates transform.position automatically
|
||||
- **State shows feedback:** Scaling up indicates "I'm being dragged"
|
||||
- **Clean separation:** Drag logic (base class) vs visual feedback (state)
|
||||
|
||||
### **Why SetDraggingEnabled():**
|
||||
- **Booster cards:** Should never be draggable (opens in place)
|
||||
- **Corner cards:** Should be draggable (placement flow)
|
||||
- **Album cards:** Should NOT be draggable once placed (locked in slot)
|
||||
- **Runtime control:** Can enable/disable per card instance
|
||||
|
||||
---
|
||||
|
||||
## Files Structure After Refactor
|
||||
|
||||
```
|
||||
CardSystem/
|
||||
├─ Card.cs ← NOW inherits from DraggableObject
|
||||
├─ CardContext.cs
|
||||
├─ CardAnimator.cs
|
||||
├─ ProgressBarController.cs
|
||||
├─ StateMachine/
|
||||
│ ├─ States/
|
||||
│ │ ├─ CardDraggingState.cs ← Simplified (visual-only)
|
||||
│ │ ├─ CardRevealedState.cs ← Drag starts from here
|
||||
│ │ ├─ CardPlacedInSlotState.cs ← Drag ends here (if valid slot)
|
||||
│ │ └─ [other states...]
|
||||
├─ DragDrop/
|
||||
│ ├─ AlbumCardSlot.cs ← Works with Card (DraggableObject)
|
||||
│ └─ AlbumCardPlacementDraggable.cs ← OLD system, for corner cards
|
||||
└─ DEPRECATED/ ✨ NEW
|
||||
├─ CardDraggable.cs ← Moved
|
||||
├─ CardDraggableVisual.cs ← Moved
|
||||
└─ FlippableCard.cs ← Moved
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
✅ **Card.cs now inherits from DraggableObject** - Owns drag capability
|
||||
✅ **Drag events trigger state transitions** - OnDragStarted → DraggingState
|
||||
✅ **DraggingState is visual-only** - Shows scale feedback
|
||||
✅ **Setup methods control dragging** - Enable/disable per flow
|
||||
✅ **Backward compatible** - Old files in DEPRECATED/
|
||||
✅ **Works with existing slots** - AlbumCardSlot unchanged
|
||||
✅ **Cleaner architecture** - No wrappers, states handle visuals
|
||||
|
||||
**Status: Drag/Drop integration complete! Ready for testing and migration.**
|
||||
|
||||
@@ -1,285 +1,303 @@
|
||||
# Card Test Scene - Quick Reference
|
||||
# Card Test Scene Quick Reference
|
||||
|
||||
## What Was Created
|
||||
**Quick lookup for card test scene usage - no slot functionality**
|
||||
|
||||
### 📁 Scripts
|
||||
- **CardTestController.cs** - Main testing controller with UI event handlers
|
||||
- Location: `Assets/Scripts/UI/CardSystem/Testing/CardTestController.cs`
|
||||
|
||||
### 📄 Documentation
|
||||
- **card_test_scene_setup_guide.md** - Complete scene setup instructions (17 steps)
|
||||
- Location: `docs/cards_wip/card_test_scene_setup_guide.md`
|
||||
**Last Updated**: November 12, 2025
|
||||
|
||||
---
|
||||
|
||||
## Quick Start Guide
|
||||
## TL;DR
|
||||
|
||||
### Step-by-Step Setup (Condensed)
|
||||
|
||||
1. **Create Scene**
|
||||
- New scene → Save as `CardSystemTestScene.unity`
|
||||
|
||||
2. **Create Canvas**
|
||||
- UI → Canvas (Screen Space, 1920x1080 reference)
|
||||
|
||||
3. **Left Side - Card Test Area (70% width)**
|
||||
```
|
||||
CardTestArea (container)
|
||||
├─ CardSpawnPoint → [Instantiate Card prefab here]
|
||||
├─ AlbumSlot1 (bottom-left, 150,150)
|
||||
└─ AlbumSlot2 (bottom-right, -150,150)
|
||||
```
|
||||
|
||||
4. **Right Side - Control Panel (30% width)**
|
||||
```
|
||||
TestControlPanel (dark gray panel)
|
||||
├─ CurrentStateText (yellow)
|
||||
├─ State Transition Buttons (7)
|
||||
├─ Simulation Buttons (4)
|
||||
├─ Card Setup Controls (toggle, slider, dropdown)
|
||||
├─ Clickability Toggle
|
||||
├─ Animation Test Buttons (4)
|
||||
├─ Event Log (scroll view)
|
||||
└─ Utility Buttons (2)
|
||||
```
|
||||
|
||||
5. **Add Controller**
|
||||
- Empty GameObject → CardTestController component
|
||||
- Assign all 11 references from hierarchy
|
||||
|
||||
6. **Wire Up Buttons**
|
||||
- Connect all button OnClick() events to CardTestController methods
|
||||
Test scene for card effects and dragging. Cards snap back to spawn point when released - **NO SLOTTING**.
|
||||
|
||||
---
|
||||
|
||||
## Testing Workflows
|
||||
## Quick Setup Checklist
|
||||
|
||||
### Test Flow 1: NEW Card
|
||||
1. Click "Simulate NEW Card"
|
||||
2. Click card → flips → shows NEW badge
|
||||
3. Tap enlarged card → shrinks to RevealedState
|
||||
4. Check event log for OnFlipComplete, OnCardDismissed, OnCardInteractionComplete
|
||||
|
||||
### Test Flow 2: REPEAT Card
|
||||
1. Set Repeat Count slider to 3
|
||||
2. Click "Simulate REPEAT Card"
|
||||
3. Click card → flips → shows progress bar (3/5) → blinks
|
||||
4. Tap → shrinks to RevealedState
|
||||
5. Verify REPEAT badge shows in RevealedState
|
||||
|
||||
### Test Flow 3: UPGRADE
|
||||
1. Click "Simulate UPGRADE (5/5)"
|
||||
2. Click card → flips → progress (5/5) → auto-upgrades
|
||||
3. Shows NEW badge at higher rarity
|
||||
4. Check event log for OnUpgradeTriggered
|
||||
|
||||
### Test Flow 4: Album Placement
|
||||
1. Click "Simulate Album Placement"
|
||||
2. Drag card to AlbumSlot1 or AlbumSlot2
|
||||
3. Card enters DraggingState (scales up)
|
||||
4. Drop → PlacedInSlotState
|
||||
5. Click card → AlbumEnlargedState
|
||||
6. Tap → back to PlacedInSlotState
|
||||
|
||||
### Test Flow 5: Manual State Jumping
|
||||
1. Click any state button (e.g., "Enlarged New")
|
||||
2. Verify visuals appear correctly
|
||||
3. Check Current State display updates
|
||||
4. Try rapid state changes
|
||||
- [ ] Create scene with Canvas + EventSystem
|
||||
- [ ] Add CardTestController GameObject
|
||||
- [ ] Add Card prefab to scene
|
||||
- [ ] Create UI buttons panel
|
||||
- [ ] Wire up all button onClick events
|
||||
- [ ] Assign all inspector references
|
||||
- [ ] Create test CardData ScriptableObject
|
||||
|
||||
---
|
||||
|
||||
## Key Features
|
||||
## Button Quick Reference
|
||||
|
||||
### State Transition Buttons
|
||||
- **7 buttons** for direct state access
|
||||
- Instantly jump to any state (bypasses normal flow)
|
||||
- Useful for testing edge cases
|
||||
### Flow Simulation (Most Used)
|
||||
```
|
||||
New Card Flow → SimulateNewCardFlow()
|
||||
Repeat Card Flow → SimulateRepeatCardFlow()
|
||||
Upgrade Flow → SimulateUpgradeFlow()
|
||||
Test Drag & Snap → TestDragAndSnap() ← NEW: Test dragging
|
||||
```
|
||||
|
||||
### Simulation Buttons
|
||||
- **Simulate NEW Card** - Full new card reveal flow
|
||||
- **Simulate REPEAT Card** - Progress bar display flow
|
||||
- **Simulate UPGRADE (5/5)** - Auto-upgrade flow
|
||||
- **Simulate Album Placement** - Drag/drop to album flow
|
||||
|
||||
### Card Setup Controls
|
||||
- **Is New Toggle** - Mark card as new/repeat
|
||||
- **Repeat Count Slider** - Set owned count (0-5)
|
||||
- **Rarity Dropdown** - Change card rarity
|
||||
- **Apply Button** - Apply all settings to card
|
||||
### State Transitions
|
||||
```
|
||||
To Idle State → TransitionToIdleState()
|
||||
To Revealed State → TransitionToRevealedState()
|
||||
To Enlarged New → TransitionToEnlargedNewState()
|
||||
To Enlarged Repeat → TransitionToEnlargedRepeatState()
|
||||
To Dragging State → TransitionToDraggingState()
|
||||
To Album Enlarged → TransitionToAlbumEnlargedState()
|
||||
```
|
||||
|
||||
### Animation Tests
|
||||
- **Play Flip** - Trigger flip animation manually
|
||||
- **Play Enlarge** - Enlarge card without state change
|
||||
- **Play Shrink** - Shrink card to normal size
|
||||
- **Start Idle Hover** - Begin hover animation
|
||||
|
||||
### Event Log
|
||||
- **Real-time event tracking** - See all CardContext events
|
||||
- **Timestamped** - Know when events fired
|
||||
- **Last 20 events** - Auto-truncates
|
||||
- **Clear button** - Reset log
|
||||
|
||||
### Utility Controls
|
||||
- **Is Clickable Toggle** - Test click blocking
|
||||
- **Reset Position** - Return card to center
|
||||
- **Clear Log** - Reset event log
|
||||
|
||||
---
|
||||
|
||||
## CardTestController API Reference
|
||||
|
||||
### Public Methods (Called by UI Buttons)
|
||||
|
||||
#### State Transitions
|
||||
```csharp
|
||||
void TransitionToIdleState()
|
||||
void TransitionToRevealedState()
|
||||
void TransitionToEnlargedNewState()
|
||||
void TransitionToEnlargedRepeatState()
|
||||
void TransitionToDraggingState()
|
||||
void TransitionToPlacedInSlotState()
|
||||
void TransitionToAlbumEnlargedState()
|
||||
```
|
||||
Play Flip → PlayFlipAnimation()
|
||||
Play Enlarge → PlayEnlargeAnimation()
|
||||
Play Shrink → PlayShrinkAnimation()
|
||||
Start Idle Hover → StartIdleHoverAnimation()
|
||||
Stop Idle Hover → StopIdleHoverAnimation()
|
||||
```
|
||||
|
||||
#### Simulations
|
||||
```csharp
|
||||
void SimulateNewCardFlow() // NEW card: Idle → Flip → EnlargedNew → RevealedState
|
||||
void SimulateRepeatCardFlow() // REPEAT: Idle → Flip → EnlargedRepeat → RevealedState
|
||||
void SimulateUpgradeFlow() // UPGRADE: Idle → Flip → EnlargedRepeat → Auto-upgrade → EnlargedNew
|
||||
void SimulateAlbumPlacementFlow() // Album: RevealedState → ready to drag
|
||||
### Utilities
|
||||
```
|
||||
|
||||
#### Card Setup
|
||||
```csharp
|
||||
void ApplyCardSetup() // Apply toggle/slider/dropdown values to card
|
||||
```
|
||||
|
||||
#### Animations
|
||||
```csharp
|
||||
void PlayFlipAnimation() // Manually trigger flip
|
||||
void PlayEnlargeAnimation() // Enlarge without state change
|
||||
void PlayShrinkAnimation() // Shrink to normal size
|
||||
void StartIdleHoverAnimation() // Start hover bobbing
|
||||
void StopIdleHoverAnimation() // Stop hover (change state to stop)
|
||||
```
|
||||
|
||||
#### Utilities
|
||||
```csharp
|
||||
void ResetCardPosition() // Return card to center position
|
||||
void ClearEventLog() // Clear event log display
|
||||
Reset Card Position → ResetCardPosition()
|
||||
Clear Event Log → ClearEventLog()
|
||||
Apply Setup → ApplyCardSetup()
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Inspector Setup Checklist
|
||||
## Inspector Fields
|
||||
|
||||
When you add CardTestController component, assign these references:
|
||||
### Required References
|
||||
```
|
||||
Test Card → Card prefab instance
|
||||
Test Card Data → CardData ScriptableObject
|
||||
```
|
||||
|
||||
### Card References
|
||||
- ✅ **Test Card** → TestCard (from hierarchy)
|
||||
- ✅ **Test Card Data** → CardData ScriptableObject asset
|
||||
### UI References
|
||||
```
|
||||
eventLogText → TextMeshProUGUI (scrollable)
|
||||
currentStateText → TextMeshProUGUI
|
||||
isNewToggle → Toggle
|
||||
repeatCountSlider → Slider (0-5)
|
||||
repeatCountLabel → TextMeshProUGUI
|
||||
rarityDropdown → TMP_Dropdown
|
||||
isClickableToggle → Toggle
|
||||
```
|
||||
|
||||
### Slot References
|
||||
- ✅ **Slot 1** → AlbumSlot1 (from hierarchy)
|
||||
- ✅ **Slot 2** → AlbumSlot2 (from hierarchy)
|
||||
|
||||
### UI References (11 total)
|
||||
- ✅ **Event Log Text** → EventLogText (in scroll view)
|
||||
- ✅ **Is New Toggle** → Toggle_IsNew
|
||||
- ✅ **Repeat Count Slider** → Slider_RepeatCount
|
||||
- ✅ **Repeat Count Label** → Label_RepeatCount
|
||||
- ✅ **Rarity Dropdown** → Dropdown_Rarity
|
||||
- ✅ **Is Clickable Toggle** → Toggle_IsClickable
|
||||
- ✅ **Current State Text** → CurrentStateText
|
||||
### REMOVED References (No Longer Used)
|
||||
```
|
||||
❌ slot1 → REMOVED
|
||||
❌ slot2 → REMOVED
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Expected Event Sequence
|
||||
## Common Test Flows
|
||||
|
||||
### NEW Card Flow
|
||||
### 1. Test New Card Reveal
|
||||
```
|
||||
[0.00s] Card Test Scene Initialized
|
||||
[0.50s] Simulating NEW CARD flow - click card to flip
|
||||
[1.20s] Event: OnFlipComplete - IsNew=True, RepeatCount=0
|
||||
[1.20s] Transitioned to EnlargedNewState
|
||||
[3.40s] Event: OnCardDismissed
|
||||
[3.40s] Transitioned to RevealedState
|
||||
[3.40s] Event: OnCardInteractionComplete
|
||||
1. Click "New Card Flow"
|
||||
2. Click the card
|
||||
3. Watch flip → enlarge → idle
|
||||
4. Check event log
|
||||
```
|
||||
|
||||
### REPEAT Card Flow (3/5)
|
||||
### 2. Test Repeat Card (3/5)
|
||||
```
|
||||
[0.00s] Card Test Scene Initialized
|
||||
[0.50s] Simulating REPEAT CARD flow (3/5) - click card to flip
|
||||
[1.20s] Event: OnFlipComplete - IsNew=False, RepeatCount=3
|
||||
[1.20s] Transitioned to EnlargedRepeatState
|
||||
[2.80s] Progress bar blink complete
|
||||
[4.10s] Event: OnCardDismissed
|
||||
[4.10s] Transitioned to RevealedState
|
||||
[4.10s] Event: OnCardInteractionComplete
|
||||
1. Set slider to 3
|
||||
2. Click "Repeat Card Flow"
|
||||
3. Click the card
|
||||
4. See "3/5" indicator
|
||||
```
|
||||
|
||||
### UPGRADE Flow (5/5)
|
||||
### 3. Test Drag Behavior ⭐ NEW
|
||||
```
|
||||
1. Click "Test Drag & Snap"
|
||||
2. Drag card anywhere
|
||||
3. Release mouse/touch
|
||||
4. Card snaps back to spawn
|
||||
5. Card returns to Idle state
|
||||
```
|
||||
|
||||
### 4. Test Upgrade
|
||||
```
|
||||
1. Click "Upgrade Flow"
|
||||
2. Click the card
|
||||
3. Watch upgrade effect
|
||||
4. Check event log for upgrade triggered
|
||||
```
|
||||
|
||||
### 5. Manual State Testing
|
||||
```
|
||||
1. Click "To [State]" button
|
||||
2. Observe card behavior
|
||||
3. Check current state display
|
||||
4. Review event log
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Expected Drag Behavior
|
||||
|
||||
### ✅ What Happens
|
||||
- Card scales up during drag
|
||||
- Card follows cursor smoothly
|
||||
- Card snaps back to spawn on release
|
||||
- Event log shows drag start/end
|
||||
- Card returns to Idle state
|
||||
|
||||
### ❌ What Does NOT Happen
|
||||
- Card does NOT snap to slots
|
||||
- Card does NOT stay where dropped
|
||||
- Card does NOT interact with album
|
||||
- No slot validation occurs
|
||||
|
||||
---
|
||||
|
||||
## Event Log Messages
|
||||
|
||||
Common messages you'll see:
|
||||
```
|
||||
[0.00s] Card Test Scene Initialized
|
||||
[0.50s] Simulating UPGRADE flow (5/5) - click card to flip
|
||||
[1.20s] Event: OnFlipComplete - IsNew=False, RepeatCount=5
|
||||
[1.20s] Transitioned to EnlargedRepeatState
|
||||
[2.80s] Event: OnUpgradeTriggered - New Rarity=Uncommon
|
||||
[2.80s] Transitioned to EnlargedNewState
|
||||
[4.50s] Event: OnCardDismissed
|
||||
[4.50s] Transitioned to RevealedState
|
||||
[4.50s] Event: OnCardInteractionComplete
|
||||
[1.23s] Simulating NEW CARD flow - click card to flip
|
||||
[2.45s] Event: OnFlipComplete - IsNew=True, RepeatCount=0
|
||||
[3.67s] Transitioned to IdleState
|
||||
[4.89s] Event: OnDragStarted - Card is being dragged
|
||||
[5.10s] Event: OnDragEnded - Snapping card back to spawn point
|
||||
[5.11s] Transitioned to IdleState
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## State Machine States
|
||||
|
||||
Available states (use "To [State]" buttons):
|
||||
1. **IdleState** - Face down, clickable, can start drag
|
||||
2. **RevealedState** - Face up, can be dragged
|
||||
3. **EnlargedNewState** - Enlarged, showing new card
|
||||
4. **EnlargedRepeatState** - Enlarged, showing repeat count
|
||||
5. **DraggingState** - Being dragged (scaled up)
|
||||
6. **AlbumEnlargedState** - Enlarged in album view
|
||||
7. ~~PlacedInSlotState~~ - **NOT USED IN TEST SCENE**
|
||||
|
||||
---
|
||||
|
||||
## Configuration Controls
|
||||
|
||||
### Is New Toggle
|
||||
- ON = Card is new (first time seen)
|
||||
- OFF = Card is repeat
|
||||
|
||||
### Repeat Count Slider
|
||||
- Range: 0-5
|
||||
- 5 triggers upgrade automatically
|
||||
|
||||
### Rarity Dropdown
|
||||
- Common, Uncommon, Rare, Epic, Legendary
|
||||
- Changes test card's rarity
|
||||
|
||||
### Is Clickable Toggle
|
||||
- ON = Card responds to clicks
|
||||
- OFF = Card ignores clicks
|
||||
|
||||
**Click "Apply Setup" after changing these values**
|
||||
|
||||
---
|
||||
|
||||
## Keyboard Shortcuts
|
||||
|
||||
None implemented yet - use buttons for all actions.
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting Quick Fixes
|
||||
|
||||
| Issue | Quick Fix |
|
||||
|-------|-----------|
|
||||
| Buttons don't work | Check EventSystem exists, verify OnClick() wired up |
|
||||
| Card not visible | Verify Card prefab instantiated, check CardSpawnPoint |
|
||||
| Events don't log | Verify EventLogText assigned, check Console for errors |
|
||||
| State won't change | Check state names match exactly (case-sensitive) |
|
||||
| Progress bar missing | Verify ProgressBarUI child exists in EnlargedRepeatState |
|
||||
| Can't drag card | Ensure AlbumCardSlot components exist on slots |
|
||||
| Current State shows "Unknown" | Normal if no state active, check card is in a state |
|
||||
### Card Won't Drag
|
||||
```
|
||||
1. Click "Test Drag & Snap" button
|
||||
2. Verify EventSystem in scene
|
||||
3. Check Canvas has GraphicRaycaster
|
||||
```
|
||||
|
||||
### Card Won't Snap Back
|
||||
```
|
||||
1. Check CardTestController is in scene
|
||||
2. Verify Awake() subscribed to OnDragEnded
|
||||
3. Check _originalCardPosition is set
|
||||
```
|
||||
|
||||
### Buttons Don't Work
|
||||
```
|
||||
1. Verify onClick events are wired
|
||||
2. Check method names (case-sensitive)
|
||||
3. Ensure CardTestController reference assigned
|
||||
```
|
||||
|
||||
### No Event Log
|
||||
```
|
||||
1. Assign eventLogText field
|
||||
2. Check TextMeshProUGUI component exists
|
||||
3. Look in Unity Console for [CardTest] logs
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## What Changed (Nov 12, 2025)
|
||||
|
||||
### Removed
|
||||
- ❌ `slot1` and `slot2` fields
|
||||
- ❌ `TransitionToPlacedInSlotState()` method
|
||||
- ❌ `SimulateAlbumPlacementFlow()` method
|
||||
- ❌ All slot-related logic
|
||||
|
||||
### Added
|
||||
- ✅ `TestDragAndSnap()` method
|
||||
- ✅ `OnCardDragStarted()` handler
|
||||
- ✅ `OnCardDragEnded()` handler with snap-back logic
|
||||
- ✅ Drag event subscription in `Awake()`
|
||||
- ✅ Drag event unsubscription in `OnDestroy()`
|
||||
|
||||
### Behavior Changes
|
||||
- Cards **always** snap back to spawn point when drag ends
|
||||
- No slot validation or placement
|
||||
- Automatic return to Idle state after drag
|
||||
- Event logging for drag start/end
|
||||
|
||||
---
|
||||
|
||||
## Performance Notes
|
||||
|
||||
- **Event Log** updates every event (can be 20+ times per flow)
|
||||
- **Current State Display** updates every 0.5 seconds (not every frame)
|
||||
- **Layout Groups** may cause GC spikes - normal for test scene
|
||||
- Target: **60fps** with card animations
|
||||
- Event log keeps last 20 messages only
|
||||
- State display updates every 0.5 seconds
|
||||
- No performance concerns for single card testing
|
||||
|
||||
---
|
||||
|
||||
## Next Steps After Setup
|
||||
|
||||
1. ✅ Create scene following guide
|
||||
2. ✅ Test all 7 state transitions
|
||||
3. ✅ Test all 4 simulation flows
|
||||
4. ✅ Verify event log shows all events
|
||||
5. ✅ Test drag/drop to album slots
|
||||
6. ✅ Test click blocking toggle
|
||||
7. ✅ Take screenshots of working states for documentation
|
||||
8. ✅ Report any bugs found in state machine
|
||||
9. ✅ Use scene for future card feature development
|
||||
|
||||
---
|
||||
|
||||
## Files to Reference
|
||||
## Related Documentation
|
||||
|
||||
- **Full Setup Guide**: `docs/cards_wip/card_test_scene_setup_guide.md`
|
||||
- **Card Assembly Guide**: `docs/cards_wip/card_prefab_assembly_guide.md`
|
||||
- **Implementation Summary**: `docs/cards_wip/card_system_implementation_summary.md`
|
||||
- **Test Controller Script**: `Assets/Scripts/UI/CardSystem/Testing/CardTestController.cs`
|
||||
- **State Machine Reference**: `docs/cards_wip/card_state_machine_quick_reference.md`
|
||||
- **Card System Overview**: `docs/cards_wip/README_CARD_SYSTEM.md`
|
||||
|
||||
---
|
||||
|
||||
**Happy Testing! 🎴**
|
||||
## Testing Checklist
|
||||
|
||||
Before moving to production:
|
||||
- [ ] New card flow works (flip animation)
|
||||
- [ ] Repeat card flow shows correct count
|
||||
- [ ] Upgrade flow triggers at 5/5
|
||||
- [ ] Drag & snap works smoothly
|
||||
- [ ] Card scales during drag
|
||||
- [ ] Card returns to spawn on release
|
||||
- [ ] Event log shows all events
|
||||
- [ ] Current state updates correctly
|
||||
- [ ] All buttons respond
|
||||
- [ ] Configuration controls work
|
||||
|
||||
---
|
||||
|
||||
## Key Reminder
|
||||
|
||||
🎯 **This test scene is for EFFECTS ONLY, not placement logic!**
|
||||
|
||||
Cards will ALWAYS snap back to spawn point. Test slot placement in album integration scenes.
|
||||
|
||||
|
||||
|
||||
@@ -1,589 +1,247 @@
|
||||
# Card Test Scene Setup Guide
|
||||
|
||||
**Purpose**: Test card state machine, animations, and drag behavior WITHOUT slot placement functionality.
|
||||
|
||||
**Last Updated**: November 12, 2025
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
This guide walks you through creating a complete testing scene for the Card state machine system. The scene provides manual controls to test all state transitions, animations, and gameplay flows.
|
||||
|
||||
This test scene provides a controlled environment to test individual card effects, state transitions, and dragging behavior. Cards can be dragged with appropriate visual effects, but will **always snap back to their spawn point** when released - no slotting logic is implemented in this test environment.
|
||||
|
||||
---
|
||||
|
||||
## Step 1: Create New Scene
|
||||
## What This Scene Tests
|
||||
|
||||
1. In Unity, **File → New Scene**
|
||||
2. Select **Basic (Built-in)** or **2D** template
|
||||
3. Save as `Assets/Scenes/CardSystemTestScene.unity`
|
||||
✅ **Card State Transitions**
|
||||
- Idle → Revealed (flip animation)
|
||||
- Revealed → Enlarged (new/repeat card display)
|
||||
- Dragging state (visual feedback during drag)
|
||||
- Return to Idle after interactions
|
||||
|
||||
✅ **Card Animations**
|
||||
- Flip animations
|
||||
- Enlarge/shrink animations
|
||||
- Drag scale effects
|
||||
- Idle hover animations
|
||||
|
||||
✅ **Card Flows**
|
||||
- New card reveal flow
|
||||
- Repeat card flow (with count display)
|
||||
- Upgrade flow (5/5 repeats)
|
||||
|
||||
✅ **Drag Behavior**
|
||||
- Card can be dragged
|
||||
- Visual scale feedback during drag
|
||||
- **Automatic snap back to spawn point on release**
|
||||
|
||||
❌ **Not Tested (Out of Scope)**
|
||||
- Slot placement logic
|
||||
- Album integration
|
||||
- Multi-card scenarios
|
||||
- Booster pack opening
|
||||
|
||||
---
|
||||
|
||||
## Step 2: Setup Canvas
|
||||
## Scene Setup Instructions
|
||||
|
||||
### Create Main Canvas
|
||||
1. Right-click in Hierarchy → **UI → Canvas**
|
||||
2. Name it `TestCanvas`
|
||||
3. In Canvas component:
|
||||
- **Render Mode**: Screen Space - Overlay
|
||||
- **UI Scale Mode**: Scale With Screen Size
|
||||
- **Reference Resolution**: 1920 x 1080
|
||||
- **Match**: 0.5 (balance between width and height)
|
||||
### 1. Create Test Scene
|
||||
- Create new scene: `Assets/Scenes/CardTestScene.unity`
|
||||
- Add Canvas with CanvasScaler configured for your target resolution
|
||||
- Add EventSystem
|
||||
|
||||
### Verify EventSystem
|
||||
- Unity should auto-create **EventSystem** GameObject
|
||||
- If not, right-click Hierarchy → **UI → Event System**
|
||||
### 2. Create Card Test GameObject
|
||||
- Create empty GameObject: "CardTestController"
|
||||
- Add `CardTestController.cs` component
|
||||
- Position in hierarchy under Canvas or as scene root
|
||||
|
||||
### 3. Setup Test Card
|
||||
- Add Card prefab to scene as child of Canvas
|
||||
- Position card at desired spawn location (center of screen recommended)
|
||||
- Assign to CardTestController → Test Card field
|
||||
- Create or assign CardData ScriptableObject → Test Card Data field
|
||||
|
||||
### 4. UI Panel Setup
|
||||
Create a panel with the following buttons and controls:
|
||||
|
||||
#### State Transition Buttons
|
||||
- "To Idle State" → `TransitionToIdleState()`
|
||||
- "To Revealed State" → `TransitionToRevealedState()`
|
||||
- "To Enlarged New" → `TransitionToEnlargedNewState()`
|
||||
- "To Enlarged Repeat" → `TransitionToEnlargedRepeatState()`
|
||||
- "To Dragging State" → `TransitionToDraggingState()`
|
||||
- "To Album Enlarged" → `TransitionToAlbumEnlargedState()`
|
||||
|
||||
#### Flow Simulation Buttons
|
||||
- "New Card Flow" → `SimulateNewCardFlow()`
|
||||
- "Repeat Card Flow" → `SimulateRepeatCardFlow()`
|
||||
- "Upgrade Flow" → `SimulateUpgradeFlow()`
|
||||
- "Test Drag & Snap" → `TestDragAndSnap()`
|
||||
|
||||
#### Animation Test Buttons
|
||||
- "Play Flip" → `PlayFlipAnimation()`
|
||||
- "Play Enlarge" → `PlayEnlargeAnimation()`
|
||||
- "Play Shrink" → `PlayShrinkAnimation()`
|
||||
- "Start Idle Hover" → `StartIdleHoverAnimation()`
|
||||
- "Stop Idle Hover" → `StopIdleHoverAnimation()`
|
||||
|
||||
#### Utility Buttons
|
||||
- "Reset Card Position" → `ResetCardPosition()`
|
||||
- "Clear Event Log" → `ClearEventLog()`
|
||||
|
||||
### 5. Configuration Controls
|
||||
Add these UI elements and wire them up:
|
||||
|
||||
- **Toggle**: "Is New Card" → `isNewToggle`
|
||||
- **Slider**: "Repeat Count (0-5)" → `repeatCountSlider`
|
||||
- Min: 0, Max: 5, Whole Numbers: true
|
||||
- **TextMeshProUGUI**: Repeat count label → `repeatCountLabel`
|
||||
- **Dropdown**: "Rarity" → `rarityDropdown`
|
||||
- Options: Common, Uncommon, Rare, Epic, Legendary
|
||||
- **Toggle**: "Is Clickable" → `isClickableToggle`
|
||||
- **Button**: "Apply Setup" → `ApplyCardSetup()`
|
||||
|
||||
### 6. Status Display
|
||||
Add these UI text fields:
|
||||
|
||||
- **TextMeshProUGUI**: "Current State: [state]" → `currentStateText`
|
||||
- **TextMeshProUGUI**: Event log (scrollable) → `eventLogText`
|
||||
|
||||
### 7. Assign All References
|
||||
In CardTestController inspector, assign all serialized fields:
|
||||
- Test Card
|
||||
- Test Card Data
|
||||
- All UI references (toggles, sliders, text fields, etc.)
|
||||
|
||||
---
|
||||
|
||||
## Step 3: Create CardTestArea (Left Side)
|
||||
## How to Use the Test Scene
|
||||
|
||||
### Create CardTestArea Container
|
||||
1. Right-click `TestCanvas` → **Create Empty**
|
||||
2. Name it `CardTestArea`
|
||||
3. Add **RectTransform** component (should auto-add)
|
||||
4. Configure RectTransform:
|
||||
- **Anchors**: Left-Stretch (left side, vertical stretch)
|
||||
- **Pivot**: (0, 0.5)
|
||||
- **Pos X**: 0
|
||||
- **Pos Y**: 0
|
||||
- **Width**: 1344 (70% of 1920)
|
||||
- **Height**: 0 (auto from anchor stretch)
|
||||
### Testing New Card Flow
|
||||
1. Click "New Card Flow" button
|
||||
2. Card starts in Idle state (face down)
|
||||
3. Click the card to flip it
|
||||
4. Card transitions through reveal → enlarged new → idle
|
||||
|
||||
### Add Background (Optional)
|
||||
1. Right-click `CardTestArea` → **UI → Image**
|
||||
2. Name it `Background`
|
||||
3. Set **Color**: Light gray (R:0.9, G:0.9, B:0.9, A:0.3)
|
||||
4. Set **Anchors**: Stretch-Stretch
|
||||
### Testing Repeat Card Flow
|
||||
1. Set repeat count slider (0-4)
|
||||
2. Click "Repeat Card Flow" button
|
||||
3. Click card to flip
|
||||
4. Observe repeat count display
|
||||
5. Card shows "x/5" indicator
|
||||
|
||||
### Add Card Spawn Point
|
||||
1. Right-click `CardTestArea` → **Create Empty**
|
||||
2. Name it `CardSpawnPoint`
|
||||
3. Configure RectTransform:
|
||||
- **Anchors**: Center-Middle
|
||||
- **Pos X**: 0
|
||||
- **Pos Y**: 100 (slightly above center)
|
||||
- **Width**: 200
|
||||
- **Height**: 280
|
||||
### Testing Upgrade Flow
|
||||
1. Click "Upgrade Flow" button (auto-sets to 5/5)
|
||||
2. Click card to flip
|
||||
3. Card automatically triggers upgrade effect
|
||||
4. Event log shows upgrade triggered
|
||||
|
||||
### Testing Drag Behavior
|
||||
1. Click "Test Drag & Snap" button
|
||||
2. Card enters Revealed state with dragging enabled
|
||||
3. **Drag the card anywhere on screen**
|
||||
4. Card scales up during drag (visual feedback)
|
||||
5. **Release the card**
|
||||
6. Card snaps back to spawn point
|
||||
7. Card returns to Idle state
|
||||
|
||||
### Testing Individual States
|
||||
- Click any "To [State]" button to jump directly to that state
|
||||
- Useful for testing specific state behavior
|
||||
- Watch event log for state transitions
|
||||
|
||||
### Testing Animations
|
||||
- Use animation test buttons to trigger individual animations
|
||||
- Combine with state transitions for complex testing
|
||||
|
||||
---
|
||||
|
||||
## Step 4: Instantiate Test Card
|
||||
|
||||
1. **Drag your Card prefab** from Project into `CardSpawnPoint`
|
||||
2. Name it `TestCard`
|
||||
3. Ensure it's positioned at (0, 0, 0) local position
|
||||
4. The card should be centered in the CardTestArea
|
||||
|
||||
**Note:** If you haven't created the Card prefab yet, follow the `card_prefab_assembly_guide.md` first.
|
||||
|
||||
---
|
||||
|
||||
## Step 5: Create Album Slots for Drag Testing
|
||||
|
||||
### Create Slot 1 (Bottom-Left)
|
||||
1. Right-click `CardTestArea` → **Create Empty**
|
||||
2. Name it `AlbumSlot1`
|
||||
3. Add Component → **Album Card Slot** (your existing script)
|
||||
4. Configure RectTransform:
|
||||
- **Anchors**: Bottom-Left
|
||||
- **Pivot**: (0.5, 0.5)
|
||||
- **Pos X**: 150
|
||||
- **Pos Y**: 150
|
||||
- **Width**: 200
|
||||
- **Height**: 280
|
||||
|
||||
5. Add child **UI → Image** for visual slot background:
|
||||
- Name it `SlotBackground`
|
||||
- Set **Color**: White with alpha 0.5
|
||||
- Set **Anchors**: Stretch-Stretch
|
||||
- Assign a slot frame sprite if available
|
||||
|
||||
### Create Slot 2 (Bottom-Right)
|
||||
1. Duplicate `AlbumSlot1` (Ctrl+D)
|
||||
2. Name it `AlbumSlot2`
|
||||
3. Configure RectTransform:
|
||||
- **Anchors**: Bottom-Right
|
||||
- **Pivot**: (0.5, 0.5)
|
||||
- **Pos X**: -150 (negative for right side)
|
||||
- **Pos Y**: 150
|
||||
- **Width**: 200
|
||||
- **Height**: 280
|
||||
|
||||
---
|
||||
|
||||
## Step 6: Create Test Control Panel (Right Side)
|
||||
|
||||
### Create Panel Container
|
||||
1. Right-click `TestCanvas` → **UI → Panel**
|
||||
2. Name it `TestControlPanel`
|
||||
3. Configure RectTransform:
|
||||
- **Anchors**: Right-Stretch (right side, vertical stretch)
|
||||
- **Pivot**: (1, 0.5)
|
||||
- **Pos X**: 0
|
||||
- **Pos Y**: 0
|
||||
- **Width**: 576 (30% of 1920)
|
||||
- **Height**: 0 (auto from anchor stretch)
|
||||
4. Set **Color**: Dark gray (R:0.2, G:0.2, B:0.2, A:0.95)
|
||||
|
||||
### Add Vertical Layout Group
|
||||
1. Select `TestControlPanel`
|
||||
2. Add Component → **Vertical Layout Group**
|
||||
3. Configure:
|
||||
- **Child Alignment**: Upper Center
|
||||
- **Control Child Size**: Width ✓, Height ✗
|
||||
- **Child Force Expand**: Width ✓, Height ✗
|
||||
- **Padding**: Left=20, Right=20, Top=20, Bottom=20
|
||||
- **Spacing**: 10
|
||||
|
||||
### Add Content Size Fitter
|
||||
1. Select `TestControlPanel`
|
||||
2. Add Component → **Content Size Fitter**
|
||||
3. Configure:
|
||||
- **Horizontal Fit**: Unconstrained
|
||||
- **Vertical Fit**: Preferred Size
|
||||
|
||||
---
|
||||
|
||||
## Step 7: Add Current State Display
|
||||
|
||||
1. Right-click `TestControlPanel` → **UI → Text - TextMeshPro**
|
||||
2. Name it `CurrentStateText`
|
||||
3. Configure:
|
||||
- **Text**: "Current State: None"
|
||||
- **Font Size**: 24
|
||||
- **Alignment**: Center
|
||||
- **Color**: Yellow
|
||||
- **Auto Size**: Min=16, Max=28
|
||||
4. Add **Layout Element** component:
|
||||
- **Preferred Height**: 40
|
||||
|
||||
---
|
||||
|
||||
## Step 8: Create State Transition Buttons Section
|
||||
|
||||
### Create Section Header
|
||||
1. Right-click `TestControlPanel` → **UI → Text - TextMeshPro**
|
||||
2. Name it `StateButtonsHeader`
|
||||
3. Configure:
|
||||
- **Text**: "State Transitions"
|
||||
- **Font Size**: 20
|
||||
- **Font Style**: Bold
|
||||
- **Color**: White
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Create Button Container
|
||||
1. Right-click `TestControlPanel` → **Create Empty**
|
||||
2. Name it `StateButtonsContainer`
|
||||
3. Add **Vertical Layout Group**:
|
||||
- **Spacing**: 5
|
||||
- **Child Force Expand**: Width ✓, Height ✗
|
||||
4. Add **Layout Element**: Preferred Height = 350
|
||||
|
||||
### Add State Transition Buttons (7 buttons)
|
||||
For each state, create a button:
|
||||
|
||||
1. Right-click `StateButtonsContainer` → **UI → Button - TextMeshPro**
|
||||
2. Name it `Button_[StateName]` (e.g., `Button_IdleState`)
|
||||
3. Configure **Button** component:
|
||||
- **On Click()**: Drag `CardTestController` GameObject
|
||||
- Select function: `CardTestController → TransitionTo[StateName]`
|
||||
4. Configure button **Text (TMP)**:
|
||||
- Set text to state name (e.g., "Idle State")
|
||||
- **Font Size**: 16
|
||||
5. Add **Layout Element**: Preferred Height = 40
|
||||
|
||||
**Create these buttons:**
|
||||
- `Button_IdleState` → "Idle State"
|
||||
- `Button_RevealedState` → "Revealed State"
|
||||
- `Button_EnlargedNewState` → "Enlarged New"
|
||||
- `Button_EnlargedRepeatState` → "Enlarged Repeat"
|
||||
- `Button_DraggingState` → "Dragging State"
|
||||
- `Button_PlacedInSlotState` → "Placed In Slot"
|
||||
- `Button_AlbumEnlargedState` → "Album Enlarged"
|
||||
|
||||
---
|
||||
|
||||
## Step 9: Create Simulation Buttons Section
|
||||
|
||||
### Create Section Header
|
||||
1. Right-click `TestControlPanel` → **UI → Text - TextMeshPro**
|
||||
2. Name it `SimulationHeader`
|
||||
3. Configure:
|
||||
- **Text**: "Flow Simulations"
|
||||
- **Font Size**: 20
|
||||
- **Font Style**: Bold
|
||||
- **Color**: Cyan
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Create Simulation Buttons Container
|
||||
1. Right-click `TestControlPanel` → **Create Empty**
|
||||
2. Name it `SimulationButtonsContainer`
|
||||
3. Add **Vertical Layout Group** (spacing=5)
|
||||
4. Add **Layout Element**: Preferred Height = 200
|
||||
|
||||
### Add Simulation Buttons (4 buttons)
|
||||
Create these buttons (same process as state buttons):
|
||||
|
||||
1. `Button_SimulateNew` → "Simulate NEW Card" → `SimulateNewCardFlow()`
|
||||
2. `Button_SimulateRepeat` → "Simulate REPEAT Card" → `SimulateRepeatCardFlow()`
|
||||
3. `Button_SimulateUpgrade` → "Simulate UPGRADE (5/5)" → `SimulateUpgradeFlow()`
|
||||
4. `Button_SimulateAlbum` → "Simulate Album Placement" → `SimulateAlbumPlacementFlow()`
|
||||
|
||||
---
|
||||
|
||||
## Step 10: Create Card Setup Controls Section
|
||||
|
||||
### Create Section Header
|
||||
1. Right-click `TestControlPanel` → **UI → Text - TextMeshPro**
|
||||
2. Name it `SetupHeader`
|
||||
3. Configure:
|
||||
- **Text**: "Card Setup"
|
||||
- **Font Size**: 20
|
||||
- **Font Style**: Bold
|
||||
- **Color**: Green
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Create Setup Container
|
||||
1. Right-click `TestControlPanel` → **Create Empty**
|
||||
2. Name it `SetupContainer`
|
||||
3. Add **Vertical Layout Group** (spacing=8)
|
||||
4. Add **Layout Element**: Preferred Height = 180
|
||||
|
||||
### Add "Is New Card" Toggle
|
||||
1. Right-click `SetupContainer` → **UI → Toggle**
|
||||
2. Name it `Toggle_IsNew`
|
||||
3. Configure label text: "Is New Card"
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Add "Repeat Count" Slider
|
||||
1. Right-click `SetupContainer` → **UI → Slider**
|
||||
2. Name it `Slider_RepeatCount`
|
||||
3. Configure **Slider** component:
|
||||
- **Min Value**: 0
|
||||
- **Max Value**: 5
|
||||
- **Whole Numbers**: ✓
|
||||
- **Value**: 0
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Add Repeat Count Label
|
||||
1. Right-click `SetupContainer` → **UI → Text - TextMeshPro**
|
||||
2. Name it `Label_RepeatCount`
|
||||
3. Configure:
|
||||
- **Text**: "0/5"
|
||||
- **Font Size**: 18
|
||||
- **Alignment**: Center
|
||||
4. Add **Layout Element**: Preferred Height = 25
|
||||
|
||||
### Add "Rarity" Dropdown
|
||||
1. Right-click `SetupContainer` → **UI → Dropdown - TextMeshPro**
|
||||
2. Name it `Dropdown_Rarity`
|
||||
3. Configure **TMP_Dropdown** component:
|
||||
- **Options**: Common, Uncommon, Rare, Epic, Legendary
|
||||
4. Add **Layout Element**: Preferred Height = 35
|
||||
|
||||
### Add "Apply Setup" Button
|
||||
1. Right-click `SetupContainer` → **UI → Button - TextMeshPro**
|
||||
2. Name it `Button_ApplySetup`
|
||||
3. Configure:
|
||||
- **Text**: "Apply Card Setup"
|
||||
- **On Click()**: `CardTestController → ApplyCardSetup()`
|
||||
4. Add **Layout Element**: Preferred Height = 40
|
||||
|
||||
---
|
||||
|
||||
## Step 11: Create Clickability Toggle
|
||||
|
||||
1. Right-click `TestControlPanel` → **UI → Toggle**
|
||||
2. Name it `Toggle_IsClickable`
|
||||
3. Configure label text: "Card Is Clickable"
|
||||
4. Set **Is On**: ✓ (checked by default)
|
||||
5. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
---
|
||||
|
||||
## Step 12: Create Animation Test Buttons Section
|
||||
|
||||
### Create Section Header
|
||||
1. Right-click `TestControlPanel` → **UI → Text - TextMeshPro**
|
||||
2. Name it `AnimationHeader`
|
||||
3. Configure:
|
||||
- **Text**: "Animation Tests"
|
||||
- **Font Size**: 20
|
||||
- **Font Style**: Bold
|
||||
- **Color**: Orange
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Create Animation Buttons Container
|
||||
1. Right-click `TestControlPanel` → **Create Empty**
|
||||
2. Name it `AnimationButtonsContainer`
|
||||
3. Add **Vertical Layout Group** (spacing=5)
|
||||
4. Add **Layout Element**: Preferred Height = 150
|
||||
|
||||
### Add Animation Buttons (4 buttons)
|
||||
1. `Button_PlayFlip` → "Play Flip" → `PlayFlipAnimation()`
|
||||
2. `Button_PlayEnlarge` → "Play Enlarge" → `PlayEnlargeAnimation()`
|
||||
3. `Button_PlayShrink` → "Play Shrink" → `PlayShrinkAnimation()`
|
||||
4. `Button_StartHover` → "Start Idle Hover" → `StartIdleHoverAnimation()`
|
||||
|
||||
---
|
||||
|
||||
## Step 13: Create Event Log Section
|
||||
|
||||
### Create Section Header
|
||||
1. Right-click `TestControlPanel` → **UI → Text - TextMeshPro**
|
||||
2. Name it `EventLogHeader`
|
||||
3. Configure:
|
||||
- **Text**: "Event Log"
|
||||
- **Font Size**: 20
|
||||
- **Font Style**: Bold
|
||||
- **Color**: White
|
||||
4. Add **Layout Element**: Preferred Height = 30
|
||||
|
||||
### Create Scroll View for Event Log
|
||||
1. Right-click `TestControlPanel` → **UI → Scroll View**
|
||||
2. Name it `EventLogScrollView`
|
||||
3. Configure:
|
||||
- **Vertical Scrollbar**: Visible, auto-hide
|
||||
- **Horizontal Scrollbar**: Hidden
|
||||
4. Add **Layout Element**:
|
||||
- **Preferred Height**: 300
|
||||
- **Flexible Height**: 1
|
||||
|
||||
### Configure Event Log Text
|
||||
1. Navigate to `EventLogScrollView → Viewport → Content`
|
||||
2. Select the **Content** GameObject
|
||||
3. Add **Content Size Fitter**:
|
||||
- **Vertical Fit**: Preferred Size
|
||||
4. Add **Vertical Layout Group**:
|
||||
- **Child Force Expand**: Height ✗
|
||||
|
||||
5. Right-click `Content` → **UI → Text - TextMeshPro**
|
||||
6. Name it `EventLogText`
|
||||
7. Configure:
|
||||
- **Text**: "(Event log will appear here)"
|
||||
- **Font Size**: 14
|
||||
- **Alignment**: Top-Left
|
||||
- **Color**: Light Green
|
||||
- **Wrapping**: Enabled
|
||||
- **Overflow**: Overflow
|
||||
|
||||
---
|
||||
|
||||
## Step 14: Create Utility Buttons Section
|
||||
|
||||
### Create Utility Buttons Container
|
||||
1. Right-click `TestControlPanel` → **Create Empty**
|
||||
2. Name it `UtilityButtonsContainer`
|
||||
3. Add **Horizontal Layout Group** (spacing=10)
|
||||
4. Add **Layout Element**: Preferred Height = 50
|
||||
|
||||
### Add Utility Buttons (2 buttons)
|
||||
1. `Button_ResetPosition` → "Reset Position" → `ResetCardPosition()`
|
||||
2. `Button_ClearLog` → "Clear Log" → `ClearEventLog()`
|
||||
|
||||
---
|
||||
|
||||
## Step 15: Setup CardTestController Component
|
||||
|
||||
### Add CardTestController Script
|
||||
1. Create a new **Empty GameObject** under `TestCanvas`
|
||||
2. Name it `CardTestController`
|
||||
3. Add Component → **Card Test Controller**
|
||||
|
||||
### Assign References
|
||||
1. Select `CardTestController` GameObject
|
||||
2. In **Card Test Controller** component, assign:
|
||||
- **Test Card**: Drag `TestCard` from hierarchy
|
||||
- **Test Card Data**: Drag a CardData ScriptableObject from Project
|
||||
- **Slot 1**: Drag `AlbumSlot1` from hierarchy
|
||||
- **Slot 2**: Drag `AlbumSlot2` from hierarchy
|
||||
- **Event Log Text**: Drag `EventLogText` from hierarchy
|
||||
- **Is New Toggle**: Drag `Toggle_IsNew` from hierarchy
|
||||
- **Repeat Count Slider**: Drag `Slider_RepeatCount` from hierarchy
|
||||
- **Repeat Count Label**: Drag `Label_RepeatCount` from hierarchy
|
||||
- **Rarity Dropdown**: Drag `Dropdown_Rarity` from hierarchy
|
||||
- **Is Clickable Toggle**: Drag `Toggle_IsClickable` from hierarchy
|
||||
- **Current State Text**: Drag `CurrentStateText` from hierarchy
|
||||
|
||||
---
|
||||
|
||||
## Step 16: Wire Up All Button Events
|
||||
|
||||
For each button created earlier, select it and configure **On Click()**:
|
||||
|
||||
1. Click **+** to add event
|
||||
2. Drag `CardTestController` GameObject to object field
|
||||
3. Select the corresponding function from dropdown
|
||||
|
||||
**State Transition Buttons:**
|
||||
- `Button_IdleState` → `CardTestController.TransitionToIdleState`
|
||||
- `Button_RevealedState` → `CardTestController.TransitionToRevealedState`
|
||||
- `Button_EnlargedNewState` → `CardTestController.TransitionToEnlargedNewState`
|
||||
- `Button_EnlargedRepeatState` → `CardTestController.TransitionToEnlargedRepeatState`
|
||||
- `Button_DraggingState` → `CardTestController.TransitionToDraggingState`
|
||||
- `Button_PlacedInSlotState` → `CardTestController.TransitionToPlacedInSlotState`
|
||||
- `Button_AlbumEnlargedState` → `CardTestController.TransitionToAlbumEnlargedState`
|
||||
|
||||
**Simulation Buttons:**
|
||||
- `Button_SimulateNew` → `CardTestController.SimulateNewCardFlow`
|
||||
- `Button_SimulateRepeat` → `CardTestController.SimulateRepeatCardFlow`
|
||||
- `Button_SimulateUpgrade` → `CardTestController.SimulateUpgradeFlow`
|
||||
- `Button_SimulateAlbum` → `CardTestController.SimulateAlbumPlacementFlow`
|
||||
|
||||
**Setup Button:**
|
||||
- `Button_ApplySetup` → `CardTestController.ApplyCardSetup`
|
||||
|
||||
**Animation Buttons:**
|
||||
- `Button_PlayFlip` → `CardTestController.PlayFlipAnimation`
|
||||
- `Button_PlayEnlarge` → `CardTestController.PlayEnlargeAnimation`
|
||||
- `Button_PlayShrink` → `CardTestController.PlayShrinkAnimation`
|
||||
- `Button_StartHover` → `CardTestController.StartIdleHoverAnimation`
|
||||
|
||||
**Utility Buttons:**
|
||||
- `Button_ResetPosition` → `CardTestController.ResetCardPosition`
|
||||
- `Button_ClearLog` → `CardTestController.ClearEventLog`
|
||||
|
||||
---
|
||||
|
||||
## Step 17: Create Test Card Data Asset (If Needed)
|
||||
|
||||
If you don't have a test CardData asset:
|
||||
|
||||
1. Right-click in `Assets/Data/CardSystem/` → **Create → AppleHills → Card Data**
|
||||
2. Name it `TestCardData_Common`
|
||||
3. Configure:
|
||||
- **Card Name**: "Test Pikachu"
|
||||
- **Rarity**: Common
|
||||
- **Copies Owned**: 0
|
||||
- **Zone**: Any test zone
|
||||
- Assign sprites if available
|
||||
4. Drag this asset to **Test Card Data** field in CardTestController
|
||||
|
||||
---
|
||||
|
||||
## Step 18: Test the Scene
|
||||
|
||||
### Play Mode Tests
|
||||
|
||||
1. **Press Play**
|
||||
2. Verify **Current State Text** shows "IdleState"
|
||||
3. Click **"Simulate NEW Card"** button
|
||||
4. Click the card in the center - it should flip and enlarge
|
||||
5. Watch **Event Log** for event messages
|
||||
6. Tap enlarged card - it should shrink to RevealedState
|
||||
7. Try other simulation buttons
|
||||
8. Test manual state transitions
|
||||
9. Test animation buttons
|
||||
|
||||
### Expected Behaviors
|
||||
|
||||
| Test | Expected Result |
|
||||
|------|----------------|
|
||||
| Click card in IdleState | Flips and transitions to EnlargedNewState or EnlargedRepeatState |
|
||||
| Simulate NEW Card | Card flips → shows NEW badge → tap → shrinks to RevealedState |
|
||||
| Simulate REPEAT (3/5) | Card flips → shows progress bar (3/5) → blinks → tap → shrinks |
|
||||
| Simulate UPGRADE (5/5) | Card flips → progress (5/5) → auto-upgrades → shows NEW at higher rarity |
|
||||
| Drag to slot | Card enters DraggingState → scales up → drops in slot → PlacedInSlotState |
|
||||
| Toggle "Is Clickable" OFF | Card ignores clicks |
|
||||
| Reset Position | Card returns to center |
|
||||
## Expected Behavior
|
||||
|
||||
### Dragging
|
||||
- ✅ Card can be dragged when in appropriate states
|
||||
- ✅ Card scales to 1.2x (or configured DragScale) while dragging
|
||||
- ✅ Card follows cursor/touch smoothly
|
||||
- ✅ Card **always snaps back to original spawn position** when released
|
||||
- ❌ Card does NOT interact with slots
|
||||
- ❌ Card does NOT stay where you drop it
|
||||
|
||||
### Event Log
|
||||
All card events are logged with timestamps:
|
||||
- State transitions
|
||||
- Drag start/end
|
||||
- Flip complete
|
||||
- Upgrade triggered
|
||||
- Interaction complete
|
||||
- Card dismissed
|
||||
|
||||
### State Display
|
||||
Current state updates in real-time (refreshes every 0.5 seconds)
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issue: Buttons don't respond
|
||||
- **Check:** Event System exists in scene
|
||||
- **Check:** Button On Click() events are wired to CardTestController
|
||||
- **Check:** CardTestController component is on a GameObject
|
||||
### Card Not Dragging
|
||||
- Ensure "Test Drag & Snap" button was clicked
|
||||
- Check that card has DraggableObject component
|
||||
- Verify EventSystem exists in scene
|
||||
- Check Canvas has GraphicRaycaster
|
||||
|
||||
### Issue: Card doesn't appear
|
||||
- **Check:** Card prefab is instantiated under CardSpawnPoint
|
||||
- **Check:** Card has CardContext, CardAnimator, CardStateMachine components
|
||||
- **Check:** TestCardData asset is assigned
|
||||
### Card Not Snapping Back
|
||||
- CardTestController should handle OnDragEnded event
|
||||
- Check event subscriptions in Awake()
|
||||
- Verify _originalCardPosition is set correctly
|
||||
|
||||
### Issue: Event Log shows nothing
|
||||
- **Check:** EventLogText is assigned in CardTestController
|
||||
- **Check:** CardContext events are being fired (check Console for logs)
|
||||
### Buttons Not Working
|
||||
- Verify all Button components have onClick events wired
|
||||
- Check CardTestController reference is assigned
|
||||
- Ensure method names match exactly (case-sensitive)
|
||||
|
||||
### Issue: State transitions don't work
|
||||
- **Check:** Card has AppleMachine with states configured
|
||||
- **Check:** States are named correctly (case-sensitive)
|
||||
- **Check:** Default State is set to IdleState in AppleMachine
|
||||
|
||||
### Issue: Progress bar doesn't show
|
||||
- **Check:** ProgressBarUI is child of EnlargedRepeatState
|
||||
- **Check:** ProgressBarController component exists and has 5 child Images
|
||||
- **Check:** Repeat count is > 0 when transitioning to EnlargedRepeatState
|
||||
### Event Log Empty
|
||||
- Assign eventLogText TextMeshProUGUI field
|
||||
- Check console for [CardTest] debug logs
|
||||
- Verify CardContext events are firing
|
||||
|
||||
---
|
||||
|
||||
## Final Hierarchy Overview
|
||||
## Key Differences from Production
|
||||
|
||||
```
|
||||
CardSystemTestScene
|
||||
├─ TestCanvas (Canvas)
|
||||
│ ├─ CardTestArea (RectTransform - 70% width)
|
||||
│ │ ├─ Background (Image)
|
||||
│ │ ├─ CardSpawnPoint
|
||||
│ │ │ └─ TestCard (Card prefab instance)
|
||||
│ │ ├─ AlbumSlot1 (AlbumCardSlot)
|
||||
│ │ │ └─ SlotBackground (Image)
|
||||
│ │ └─ AlbumSlot2 (AlbumCardSlot)
|
||||
│ │ └─ SlotBackground (Image)
|
||||
│ │
|
||||
│ ├─ TestControlPanel (Panel - 30% width, right side)
|
||||
│ │ ├─ CurrentStateText (TextMeshPro)
|
||||
│ │ ├─ StateButtonsHeader (TextMeshPro)
|
||||
│ │ ├─ StateButtonsContainer
|
||||
│ │ │ ├─ Button_IdleState
|
||||
│ │ │ ├─ Button_RevealedState
|
||||
│ │ │ ├─ Button_EnlargedNewState
|
||||
│ │ │ ├─ Button_EnlargedRepeatState
|
||||
│ │ │ ├─ Button_DraggingState
|
||||
│ │ │ ├─ Button_PlacedInSlotState
|
||||
│ │ │ └─ Button_AlbumEnlargedState
|
||||
│ │ ├─ SimulationHeader (TextMeshPro)
|
||||
│ │ ├─ SimulationButtonsContainer
|
||||
│ │ │ ├─ Button_SimulateNew
|
||||
│ │ │ ├─ Button_SimulateRepeat
|
||||
│ │ │ ├─ Button_SimulateUpgrade
|
||||
│ │ │ └─ Button_SimulateAlbum
|
||||
│ │ ├─ SetupHeader (TextMeshPro)
|
||||
│ │ ├─ SetupContainer
|
||||
│ │ │ ├─ Toggle_IsNew
|
||||
│ │ │ ├─ Slider_RepeatCount
|
||||
│ │ │ ├─ Label_RepeatCount
|
||||
│ │ │ ├─ Dropdown_Rarity
|
||||
│ │ │ └─ Button_ApplySetup
|
||||
│ │ ├─ Toggle_IsClickable
|
||||
│ │ ├─ AnimationHeader (TextMeshPro)
|
||||
│ │ ├─ AnimationButtonsContainer
|
||||
│ │ │ ├─ Button_PlayFlip
|
||||
│ │ │ ├─ Button_PlayEnlarge
|
||||
│ │ │ ├─ Button_PlayShrink
|
||||
│ │ │ └─ Button_StartHover
|
||||
│ │ ├─ EventLogHeader (TextMeshPro)
|
||||
│ │ ├─ EventLogScrollView
|
||||
│ │ │ └─ Viewport → Content
|
||||
│ │ │ └─ EventLogText (TextMeshPro)
|
||||
│ │ └─ UtilityButtonsContainer
|
||||
│ │ ├─ Button_ResetPosition
|
||||
│ │ └─ Button_ClearLog
|
||||
│ │
|
||||
│ └─ CardTestController (Empty GameObject with CardTestController component)
|
||||
│
|
||||
└─ EventSystem
|
||||
```
|
||||
| Feature | Test Scene | Production |
|
||||
|---------|-----------|------------|
|
||||
| **Drag Target** | Snap back to spawn | Place in album slots |
|
||||
| **Slot Logic** | None | Full slot validation |
|
||||
| **Card Count** | Single card only | Multiple cards/deck |
|
||||
| **Context** | Isolated testing | Full game integration |
|
||||
| **Purpose** | Test effects/animations | Actual gameplay |
|
||||
|
||||
---
|
||||
|
||||
## Success Criteria
|
||||
## Files Involved
|
||||
|
||||
✅ Scene opens without errors
|
||||
✅ Card appears in center of left panel
|
||||
✅ All buttons are visible and labeled
|
||||
✅ Current State display shows active state
|
||||
✅ Event log displays messages when events fire
|
||||
✅ Card responds to clicks and state transitions
|
||||
✅ Simulation buttons work (NEW, REPEAT, UPGRADE flows)
|
||||
✅ Drag to album slots works
|
||||
✅ Reset position returns card to center
|
||||
✅ All 7 states can be manually triggered
|
||||
- **Script**: `Assets/Scripts/UI/CardSystem/Testing/CardTestController.cs`
|
||||
- **Scene**: `Assets/Scenes/CardTestScene.unity` (you create this)
|
||||
- **Card Prefab**: `Assets/Prefabs/UI/Card.prefab`
|
||||
- **Documentation**: This file
|
||||
|
||||
---
|
||||
|
||||
## Next Steps After Testing
|
||||
|
||||
Once individual card effects work in this test scene:
|
||||
1. Move to album integration testing
|
||||
2. Test slot placement logic separately
|
||||
3. Combine card + slot in production scenes
|
||||
4. Test booster pack opening flows
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- **No slot references**: The test controller no longer has slot1/slot2 fields
|
||||
- **Simplified focus**: Test ONLY card behavior, not placement logic
|
||||
- **Snap-back is intentional**: This ensures clean, repeatable testing
|
||||
- **Event logging**: Use the event log to debug timing issues
|
||||
|
||||
**Once all criteria met, you have a fully functional Card testing scene! 🎉**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user