fix(ui): 몬스터 사망 애니메이션 상태 리셋 버그 수정

- 새 몬스터 등장 시 이전 사망 애니메이션 상태 초기화
- 전투 시작 시 _showDeathAnimation, _deathAnimationMonsterLines 리셋
- 이전 몬스터 사망 애니메이션 도중 새 전투 시작 시 몬스터 숨김 방지
This commit is contained in:
JiWoong Sul
2026-01-14 23:04:45 +09:00
parent 02d4d1d397
commit 85413362a2

View File

@@ -242,6 +242,14 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
_lastMonsterBaseName = widget.monsterBaseName;
}
// 새 몬스터 등장 시 사망 애니메이션 상태 리셋
// (이전 몬스터 사망 애니메이션이 끝나기 전에 새 전투 시작 시 대응)
if (oldWidget.monsterBaseName != widget.monsterBaseName &&
widget.monsterBaseName != null) {
_showDeathAnimation = false;
_deathAnimationMonsterLines = null;
}
if (oldWidget.taskType != widget.taskType ||
oldWidget.monsterBaseName != widget.monsterBaseName ||
oldWidget.weaponName != widget.weaponName ||
@@ -550,6 +558,9 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
_battleSubFrame = 0;
_phaseIndex = 0;
_phaseFrameCount = 0;
// 새 전투 시작 시 사망 애니메이션 상태 리셋 (몬스터 숨김 방지)
_showDeathAnimation = false;
_deathAnimationMonsterLines = null;
}
case AsciiAnimationType.town: