Fix: Remove redundant animation wrapper for enemy

This commit is contained in:
Horoli 2025-12-07 19:45:16 +09:00
parent 3030c09d55
commit cb7e75064f
2 changed files with 22 additions and 9 deletions

View File

@ -509,17 +509,15 @@ class _BattleScreenState extends State<BattleScreen> {
Positioned(
top: 0,
right: 0,
child: BattleAnimationWidget(
key: _enemyAnimKey,
child: CharacterStatusCard(
character: battleProvider.enemy,
isPlayer: false,
isTurn: !battleProvider.isPlayerTurn,
key: _enemyKey,
animationKey: _enemyAnimKey, // Direct Pass
hideStats: _isEnemyAttacking,
),
),
),
// Player (Bottom Left)
Positioned(
bottom: 80, // Space for FABs

View File

@ -0,0 +1,15 @@
# 66. Fix Double Animation Wrapper
## 1. 목표 (Goal)
- 적 공격 애니메이션 시 타격 이펙트가 이상하게 동작하거나 중복되는 문제를 해결합니다.
## 2. 원인 (Cause)
- `CharacterStatusCard`는 내부적으로 이미 `BattleAnimationWidget`을 포함하고 있습니다.
- 그러나 `BattleScreen`에서 적 카드를 또다시 `BattleAnimationWidget`으로 감싸는 실수를 범하여 위젯이 중복되었습니다.
## 3. 해결 방안 (Solution)
- `BattleScreen`에서 적 카드를 감싸고 있는 `BattleAnimationWidget`을 제거합니다.
- 대신 `CharacterStatusCard``animationKey` 파라미터에 `_enemyAnimKey`를 직접 전달합니다 (플레이어와 동일한 방식).
## 4. 기대 효과 (Expected Outcome)
- 위젯 구조가 단순화되고 애니메이션 제어가 정상적으로 동작합니다.