fix(animation): WASM 안정성 및 부활 동기화 개선
- GamePlayScreen에 SchedulerBinding으로 setState 안전 처리 - AsciiAnimationCard에서 재개 시 specialAnimation 동기화 - 부활 시 isPaused와 specialAnimation 동시 변경 대응
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user