diff --git a/lib/screens/battle_screen.dart b/lib/screens/battle_screen.dart index 5a1c344..46640f9 100644 --- a/lib/screens/battle_screen.dart +++ b/lib/screens/battle_screen.dart @@ -509,15 +509,13 @@ class _BattleScreenState extends State { Positioned( top: 0, right: 0, - child: BattleAnimationWidget( - key: _enemyAnimKey, - child: CharacterStatusCard( - character: battleProvider.enemy, - isPlayer: false, - isTurn: !battleProvider.isPlayerTurn, - key: _enemyKey, - hideStats: _isEnemyAttacking, - ), + child: CharacterStatusCard( + character: battleProvider.enemy, + isPlayer: false, + isTurn: !battleProvider.isPlayerTurn, + key: _enemyKey, + animationKey: _enemyAnimKey, // Direct Pass + hideStats: _isEnemyAttacking, ), ), // Player (Bottom Left) diff --git a/prompt/66_fix_double_animation.md b/prompt/66_fix_double_animation.md new file mode 100644 index 0000000..1738431 --- /dev/null +++ b/prompt/66_fix_double_animation.md @@ -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) +- 위젯 구조가 단순화되고 애니메이션 제어가 정상적으로 동작합니다.