fix(animation): WASM 안정성 및 부활 동기화 개선

- GamePlayScreen에 SchedulerBinding으로 setState 안전 처리
- AsciiAnimationCard에서 재개 시 specialAnimation 동기화
- 부활 시 isPaused와 specialAnimation 동시 변경 대응
This commit is contained in:
JiWoong Sul
2025-12-26 17:52:43 +09:00
parent 0865f842a0
commit c55530d3be
2 changed files with 22 additions and 2 deletions

View File

@@ -147,7 +147,15 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
_timer?.cancel();
_timer = null;
} else {
// 재개: 애니메이션 재시작 (현재 프레임 유지)
// 재개 시: specialAnimation 동기화 (isPaused와 동시에 변경될 수 있음)
// 예: 부활 시 isPaused가 true→false로 바뀌면서 동시에
// specialAnimation이 null→resurrection으로 변경됨
if (widget.specialAnimation != _currentSpecialAnimation) {
_currentSpecialAnimation = widget.specialAnimation;
_updateAnimation(); // _updateAnimation이 타이머 재시작도 처리함
return;
}
// 일반 재개: 애니메이션 재시작 (현재 프레임 유지)
_restartTimer();
}
return;